zhuangdizhu / FedGen

Code and data accompanying the FedGen paper
234 stars 69 forks source link

Question about the implementation of "FedProx" #12

Open Sherrylife opened 2 years ago

Sherrylife commented 2 years ago

Hi.

Does your implementation code of FedProx correspond to the algorithm block 2 in the original paper of FedProx? More specifically, the formula for updating lines 53-54 of code file "fedoptimizer.py" seems a little strange, right? In particular, what does lambda mean in FedProx algorithm?

The update formula I understand should be : p.data=p.data - group['lr'] ( p.grad. data + group ['mu'] (p.data - pstar.data.clone())

Looking forward to your reply.