Skip to content

Commit

Permalink
use a deepcopy to store gm_param
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiao-Chenguang committed Oct 28, 2024
1 parent fd0b9d7 commit fb4127f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fedmind/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(
self._criterion = criterion
self.args = args

self._gm_params = self._model.state_dict(destination=StateDict())
self._gm_params = self._model.state_dict(destination=StateDict()) * 1
optim: dict = self.args.OPTIM
if optim["NAME"] == "SGD":
self._optimizer = SGD(self._model.parameters(), lr=optim["LR"])
Expand Down

0 comments on commit fb4127f

Please sign in to comment.