 UserUpdate(\(w, D\) ):   // Done by users
\(\mathcal {B} \leftarrow \)  (split \(D\)  into batches of size \(B\) )
each local epoch \(i\)  from 1 to \(E\) 
batch \(b \in \mathcal {B}\) 
\(w \leftarrow w - \eta \triangledown \ell (w; b)\) 
return \(w\)  and \(|D|\)  to server

algorithm[1]} FedAvg.
\(n\)  is the number of users, \(c\)  is the fraction of users selected for each round, and \(D_u\)  is the dataset of user \(u\)  with \(n_{s,u}\)  samples.
