Skip to content

Commit 2b95cf3

Browse files
committed
remove_mu_is_0
Signed-off-by: Shekhawat, Nisha <nisha.shekhawat@intel.com>
1 parent 5c07782 commit 2b95cf3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openfl/utilities/optimizers/torch/fedprox.py

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def step(self, closure=None):
177177
self._validate_old_weights(mu, w_old)
178178

179179
# Apply proximal term when mu != 0
180-
apply_proximal = w_old is not None and mu != 0
180+
apply_proximal = w_old is not None
181181

182182
for i, p in enumerate(group["params"]):
183183
if p.grad is None:
@@ -536,7 +536,7 @@ def adam(
536536
self._validate_old_weights(mu, w_old)
537537

538538
# Apply proximal term when mu != 0
539-
apply_proximal = w_old is not None and mu != 0
539+
apply_proximal = w_old is not None
540540

541541
for i, param in enumerate(params):
542542
grad = grads[i]

0 commit comments

Comments
 (0)