from tensorflow.python.ops import math_ops

        self._lambda_t = ops.convert_to_tensor(self._lambda, name="lambda")

    def _apply_dense(self, grad, var):
        lr_t = math_ops.cast(self._lr_t, var.dtype.base_dtype)
        lambda_t = math_ops.cast(self._lambda_t, var.dtype.base_dtype)

        g_t = grad
        var_update = state_ops.assign_sub(var,
