Skip to content

Commit

Permalink
Fix FedAdam and FedYogi to match the paper (#885)
Browse files Browse the repository at this point in the history
Co-authored-by: Pedro Porto Buarque de Gusmão <pedropgusmao@gmail.com>
  • Loading branch information
Jueun-Park and pedropgusmao authored Oct 28, 2021
1 parent df34a20 commit 1b8dc4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/py/flwr/server/strategy/fedyogi.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def aggregate_fit(
self.v_t = [np.zeros_like(x) for x in self.delta_t]

self.v_t = [
x + (1.0 - self.beta_2) * np.multiply(y, y) * np.sign(x - np.multiply(y, y))
x - (1.0 - self.beta_2) * np.multiply(y, y) * np.sign(x - np.multiply(y, y))
for x, y in zip(self.v_t, self.delta_t)
]

Expand Down

0 comments on commit 1b8dc4c

Please sign in to comment.