import tensorflow as tf

        v_grads_and_vars = v_grad_clip_fn(grads_and_vars)
        v_grads, _ = zip(*v_grads_and_vars)
        v_grads_true = tf.clip_by_value(grads,
                                        hparams["kwargs"]["clip_value_min"],
                                        hparams["kwargs"]["clip_value_max"])

        with self.test_session() as sess:
            sess.run(tf.global_variables_initializer())
            gn_grads_, gn_grads_true_, v_grads_, v_grads_true_ = sess.run(
                [gn_grads, gn_grads_true, v_grads, v_grads_true])
            np.testing.assert_array_equal(gn_grads_, gn_grads_true_)
            np.testing.assert_array_equal(v_grads_, v_grads_true_)

    def test_get_train_op(self):
