import tensorflow as tf

            for variable, value in zip(all_vars, cog):
                vstar = self.get_slot(variable, "vstar")
                vstar.load(value, client.model.sess)
        
        # get old gradient
        _, gprev = client.get_grads()

        # Find g_t - F'(old)
        gdiff = [g1 - g2 for g1, g2 in zip(avg_gradient, gprev)]

        with client.model.graph.as_default():
            all_vars = tf.trainable_variables()
            for variable, grad in zip(all_vars, gdiff):
                gold = self.get_slot(variable, "gold")
                gold.load(grad, client.model.sess)
