-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FedOpt with batchnorm #1851
FedOpt with batchnorm #1851
Conversation
04edcaf
to
4465fde
Compare
/build |
@holgerroth thank you for the fix. One thing here, since now your implementation differs from original paper (as you have this workaround to support batch norm) Thanks! |
Good point. Added a description of the new behavior. |
/build |
/build |
/build |
1 similar comment
/build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* support FedOpt with batch norm layers * support filtered model diff
Fixes #1718.
Description
Support using FedOpt with models containing BatchNorm layers. BN layers are not included in
self.model.named_parameters()
and are not updated by the optimizer. With this PR, BN layers are updated using FedAvg.By setting lr=1 and momentum=0 with no learning rate scheduler, FedOpt achieves the same global model performance as FedAvg using torchvision's
mobilenet_v2
, as expectedTypes of changes
./runtest.sh
.