We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ec22c7 commit 859775bCopy full SHA for 859775b
1 file changed
fl.py
@@ -12,15 +12,24 @@ def model_fn():
12
server = fed_learn.Server(model_fn, NB_CLIENTS, weight_summarizer)
13
14
for epoch in range(NB_EPOCHS):
15
+ print("Global Epoch {0} is starting".format(epoch))
16
+ server.create_clients()
17
server.init_for_new_epoch()
18
19
+ loss = []
20
+
21
for client in server.clients:
22
+ print("Client {0} is starting the training".format({client.id}))
23
24
server.send_model(client)
25
server.send_train_data(client)
26
- client.edge_train(server.get_client_train_param_dict())
27
+ hist = client.edge_train(server.get_client_train_param_dict())
28
+ loss.append(hist.history["loss"])
29
30
server.receive_results(client)
31
32
server.summarize_weights()
33
+ print("-" * 30)
34
35
# TODO: test the base model with the aggregated weights
0 commit comments