from tensorflow.python.ops import state_ops


        with ops.control_dependencies([v_diff]):  # run v_diff operation before scatter_add
            scaled_grad = scatter_add(vstar, indices, grad)
        var_update = state_ops.assign_sub(var, lr_t * (scaled_grad + gold))

        return control_flow_ops.group(*[var_update, ])
