FedROD

Implementation of the FedROD [FedROD22] algorithm.

References

[FedROD22]

Hong-You Chen and Wei-Lun Chao. On Bridging Generic and Personalized Federated Learning for Image Classification. In ICLR (2022). URL: https://openreview.net/pdf?id=I1hQbx10Kxn

Classes included in fluke.algorithms.fedrod

RODModel

BalancedSoftmaxLoss

Compute the Balanced Softmax Loss.

FedRODClient

FedROD

Classes

class fluke.algorithms.fedrod.RODModel(global_model: EncoderHeadNet, local_head: EncoderHeadNet)[source]

Bases: Module

class fluke.algorithms.fedrod.BalancedSoftmaxLoss(sample_per_class: Tensor)[source]

Bases: Module

Compute the Balanced Softmax Loss.

Parameters:

sample_per_class (torch.Tensor) – Number of samples per class.

class fluke.algorithms.fedrod.FedRODClient(index: int, train_set: FastDataLoader, test_set: FastDataLoader, optimizer_cfg: OptimizerConfigurator, loss_fn: Module, local_epochs: int, **kwargs: dict[str, Any])[source]

Bases: Client

class fluke.algorithms.fedrod.FedROD(n_clients: int, data_splitter: DataSplitter, hyper_params: DDict)[source]

Bases: CentralizedFL