from tensorflow.python.ops import state_ops

        g_t = tf.div(m_t_hat, tf.sqrt(v_t_hat) + eps)
        g_t_1 = self.get_slot(var, "g")
        g_t = g_t_1.assign(g_t)

        var_update = state_ops.assign_sub(var,
                                          2. * lr_t * g_t - lr_t * g_t_1)  # Adam would be lr_t * g_t
        return control_flow_ops.group(*[var_update, m_t, v_t, g_t])

