aggregator#
Module Contents#
Define the algorithm of parameters aggregation |
- class Aggregators#
Bases:
object
Define the algorithm of parameters aggregation
- static fedavg_aggregate(serialized_params_list, weights=None)#
FedAvg aggregator
Paper: http://proceedings.mlr.press/v54/mcmahan17a.html
- Parameters:
serialized_params_list (list[torch.Tensor])) – Merge all tensors following FedAvg.
weights (list, numpy.array or torch.Tensor, optional) – Weights for each params, the length of weights need to be same as length of
serialized_params_list
- Returns:
torch.Tensor
- static fedasync_aggregate(server_param, new_param, alpha)#
FedAsync aggregator