Skip to content

Commit f1e84eb

Browse files
committed
epoch initializer called before creating clients fix
1 parent ac061d7 commit f1e84eb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

fl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def model_fn():
2525

2626
for epoch in range(nb_epochs):
2727
print("Global Epoch {0} is starting".format(epoch))
28-
server.create_clients()
2928
server.init_for_new_epoch()
29+
server.create_clients()
3030

3131
for client in server.clients:
3232
print("Client {0} is starting the training".format(client.id))
@@ -44,7 +44,7 @@ def model_fn():
4444
epoch_mean_loss = np.mean(server.epoch_losses)
4545
server.global_losses.append(epoch_mean_loss)
4646
print("Loss (mean): {0}".format(server.global_losses[-1]))
47-
47+
4848
print("-" * 30)
4949

5050
# TODO: test the base model with the aggregated weights

0 commit comments

Comments
 (0)