def testNoOtherGradients(self):
    """Tests no gradient propagates through any tensors other than `q_tm1`."""
    # Gradients are only defined for q_tm1, not any other input.
    # Bellman residual variants could potentially generate a gradient wrt q_t.
    gradients = tf.gradients([self.loss_op],
                             [self.r_t, self.a_tm1, self.pcont_t, self.v_t])
    self.assertEqual(gradients, [None, None, None, None])
Tests no gradient propagates through any tensors other than `q_tm1`.
trfl/action_value_ops_test.py