fedavgm
FedAvgm(learning_rate=1, momentum=0.0)
¶
Bases: FedOpt
Implementation based on https://arxiv.org/abs/1909.06335.
Attributes:
Name | Type | Description |
---|---|---|
learning_rate |
float
|
learning rate. Defaults to 1. |
momentum |
float
|
momentum factor. Defaults to 0.0. |
Source code in iflearner/business/homo/strategy/opt/fedavgm.py
step(pseudo_gradient)
¶
a step to optimize parameters of server model with pseudo gradient.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pseudo_gradient |
Dict[str, npt.NDArray[np.float32]]
|
the pseudo gradient of server model |
required |
Returns:
Type | Description |
---|---|
Dict[str, npt.NDArray[np.float32]]
|
Dict[str, npt.NDArray[np.float32]]: parameters of server model after step |