I am not sure about this, but it seems that Alg. 2 (In the paper) does not match exactly the implementation in [flearn/trainers/qffedavg.py](https://github.com/litian96/fair_flearn/blob/master/flearn/trainers/qffedavg.py). Specifically, in Line 62 you have
Hello,
I am not sure about this, but it seems that Alg. 2 (In the paper) does not match exactly the implementation in
[flearn/trainers/qffedavg.py](https://github.com/litian96/fair_flearn/blob/master/flearn/trainers/qffedavg.py)
. Specifically, in Line 62 you havehs.append(self.q * np.float_power(loss+1e-10, (self.q-1)) * norm_grad(grads) + (1.0/self.learning_rate) * np.float_power(loss+1e-10, self.q))
While Alg. 2 suggests that you should have
hs.append(self.q * np.float_power(loss+1e-10, (self.q-1)) * np.power(norm_grad(grads), 2) + (1.0/self.learning_rate) * np.float_power(loss+1e-10, self.q))