litian96 / FedProx

Federated Optimization in Heterogeneous Networks (MLSys '20)
MIT License
650 stars 158 forks source link

Where is the gamma in the code implemetion? #39

Open Diracckjy opened 1 year ago

Diracckjy commented 1 year ago

According to Algorithm 2, there is a parameter gamma in the input which measures how much local computation is performed to solve the local subproblem on device k at the t-th round. image But I can't find gamma in the code implemention. In (https://github.com/litian96/FedProx/blob/master/flearn/models/mnist/mclr.py) there is only a variable num_epochs. def solve_inner(self, data, num_epochs=1, batchsize=32): '''Solves local optimization problem''' for in trange(num_epochs, desc='Epoch: ', leave=False, ncols=120): for X, y in batch_data(data, batch_size): with self.graph.as_default(): self.sess.run(self.train_op, feed_dict={self.features: X, self.labels: y}) soln = self.get_params() comp = num_epochs (len(data['y'])//batch_size) batch_size * self.flops return soln, comp So could please help me find gamma?

andzhou commented 1 year ago

yes, I also can't find the gamma