|
Algorithm 1 The FedAvg algorithm. K clients are indexed by k, B is the local minibatch size, E is the number of local epochs, and is the learning rate. |
-
1:
Server executes:
-
2:
initialize
-
3:
for do
-
4:
-
5:
(random set of m clients)
-
6:
for
do
-
7:
-
8:
end for
-
9:
-
10:
end for
-
11:
ClientUpdate: //run on client k
-
12:
(split into batches of size B)
-
13:
for
do
-
14:
for
do
-
15:
-
16:
end for
-
17:
end for
-
18:
return w to Server
|