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
Classes¶
- class fluke.algorithms.fedproto.FedProtoModel(model: EncoderHeadNet, prototypes: dict[int, Tensor], device: device)[source]¶
Bases:
Module
- 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, clipping: float = 0, **kwargs)[source]¶
Bases:
Client
- class fluke.algorithms.fedproto.FedProtoServer(model: Module, test_set: FastDataLoader, clients: Collection[Client], weighted: bool = True, n_protos: int = 10)[source]¶
Bases:
Server
- class fluke.algorithms.fedproto.FedProto(n_clients: int, data_splitter: DataSplitter, hyper_params: DDict | dict[str, Any], **kwargs)[source]¶
Bases:
CentralizedFL