fl4health.model_bases.fedrep_base module¶
- class FedRepModel(base_module, head_module, flatten_features=False)[source]¶
Bases:
SequentiallySplitExchangeBaseModelImplementation of the FedRep model structure: https://arxiv.org/pdf/2102.07078.pdf.
The architecture is fairly straightforward. The global module represents the first set of layers. These are learned with FedAvg. The
local_prediction_headare the last layers, these are not exchanged with the server. The approach resembles FENDA, but vertical rather than parallel models. It also resembles MOON, but with partial weight exchange for weight aggregation.- freeze_base_module()[source]¶
Any parameters in the
base_moduleare fixed by settingrequires_gradto False.- Return type:
- freeze_head_module()[source]¶
Any parameters in the
head_moduleare fixed by settingrequires_gradto False.- Return type: