Skip to main content
. 2022 May 13;22(10):3728. doi: 10.3390/s22103728
Algorithm 1 FederatedAveraging. The K clients are indexed by k, B is the local minibatch size, E is the number of local epochs, and η is the learning rate.
Service executes:
  • w0 random initialization
  • for each round t = 1,2,... do
  •     St (random subset of max(C×K,1) clients)
  •     for each client kSt in parallel do
  •         wt+1k ClientUpdate(k,wt)
  •     end for
  •     wt+1k=1Knknwt+1k
  • end for
Client update(k,w):
  • Split local dataset in B (Bnk batches of size B)
  • for epoch e1,E do
  •     for batch bB do
  •         wwη(w;b)
  •     end for
  • end for
  • return w to server