import tensorflow as tf

        self._assert_all_finite(grads[1].eval())

  def test_prob_and_grad_gives_finite_results_for_common_events(self):
    with self.test_session():
      mu = tf.Variable(0.0, name="mu")
      sigma = tf.Variable(1.0, name="sigma")
      qdist = distributions.QuantizedDistribution(
          base_dist_cls=distributions.Normal,
          mu=mu,
          sigma=sigma)
