Skip to content

Commit

Permalink
Update training.py
Browse files Browse the repository at this point in the history
  • Loading branch information
iProzd committed Sep 21, 2024
1 parent 85c4f3a commit 5691ed8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deepmd/pt/train/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ def save_model(self, save_path, lr=0.0, step=0):
)
module.train_infos["lr"] = float(lr)
module.train_infos["step"] = step
optim_state_dict = self.optimizer.state_dict()
optim_state_dict = deepcopy(self.optimizer.state_dict())
for item in optim_state_dict["param_groups"]:
item["lr"] = float(item["lr"])
torch.save(
Expand Down

0 comments on commit 5691ed8

Please sign in to comment.