import tensorflow as tf

        self.weight_norms = [tf.norm(v) + NUMTOL for (g, v) in clipped_grads_and_vars]
        # check that gradients are finite
        grads = [tf.check_numerics(g, "grads is not finite") for (g, v) in clipped_grads_and_vars]
        variables = [tf.check_numerics(v, "grads is not finite") for (g, v) in clipped_grads_and_vars]
