def testGradVtm1(self):
    """Tests that the gradients of negative loss are equal to the td_error."""
    with self.test_session() as sess:
      # Take gradients of the negative loss, so that the tests here check the
      # values propagated during gradient _descent_, rather than _ascent_.
      gradients = tf.gradients([-self.value_learning.loss], [self.v_tm1])
      grad_v_tm1 = sess.run(gradients[0])
      self.assertAllClose(grad_v_tm1, [-2, -2, -2, -2, -1.5, -1, -2, -1, 0])
Tests that the gradients of negative loss are equal to the td_error.
trfl/value_ops_test.py