A simple Python implementation of FedAVG, using tensorflow and keras, based on McMahan et al. paper [1].
The function receives 2 parameters: a list of clients' models and a list with the sample size of each client dataset.
The function returns a keras model.
[1] McMahan, Brendan, et al. "Communication-efficient learning of deep networks from decentralized data." Artificial intelligence and statistics. PMLR, 2017.