FedProto
¶
Implementation of the FedProto [FedProto22] algorithm. .. rubric:: References
[FedProto22]
Yue Tan, Guodong Long, Lu Liu, Tianyi Zhou, Qinghua Lu, Jing Jiang, Chengqi Zhang. FedProto: Federated Prototype Learning across Heterogeneous Clients. In AAAI (2022). URL: https://arxiv.org/abs/2105.00243
Classes included in fluke.algorithms.fedproto
Model used by the FedProto algorithm. |
|
Classes¶
- class fluke.algorithms.fedproto.FedProtoModel(model: EncoderHeadNet, prototypes: dict[int, Tensor], device: device)[source]¶
Bases:
Module
Model used by the FedProto algorithm. This model wraps a neural network model and a set of prototypes.
- Parameters:
model (EncoderHeadNet) – The neural network model.
prototypes (dict[int, torch.Tensor]) – The prototypes.
device (torch.device) – The device where the model will run.
- class fluke.algorithms.fedproto.FedProtoClient(index: int, model: Module, train_set: FastDataLoader, test_set: FastDataLoader, optimizer_cfg: OptimizerConfigurator, loss_fn: Module, local_epochs: int, n_protos: int, lam: float, fine_tuning_epochs: int = 0, **kwargs: dict[str, Any])[source]¶
Bases:
PFLClient