From 268fb5a9368665f254ce88c6313c6ddd677e1d6b Mon Sep 17 00:00:00 2001 From: mattiasakesson <33224977+mattiasakesson@users.noreply.github.com> Date: Tue, 5 Dec 2023 13:44:26 +0100 Subject: [PATCH] Bugfix/GH-492 |Fix kerashelper increment helper error (#493) --- fedn/fedn/utils/plugins/kerashelper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fedn/fedn/utils/plugins/kerashelper.py b/fedn/fedn/utils/plugins/kerashelper.py index 195858c76..7a931ae34 100644 --- a/fedn/fedn/utils/plugins/kerashelper.py +++ b/fedn/fedn/utils/plugins/kerashelper.py @@ -30,7 +30,7 @@ def increment_average(self, model, model_next, num_examples, total_examples): w = num_examples / total_examples weights = [] for i in range(len(model)): - weights.append(w * model[i] + (1 - w) * model_next[i]) + weights.append(w * model_next[i] + (1 - w) * model[i]) return weights