Skip to content

Commit e71b5c2

Browse files
committed
Update training.py
1 parent 5dfc85b commit e71b5c2

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

deepmd/pt/train/training.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,10 @@ def get_lr(lr_params):
417417
missing_keys = [
418418
item for item in target_keys if item not in input_keys
419419
]
420+
old_model_params = self.wrapper.state_dict()["_extra_state"][
421+
"model_params"
422+
]
423+
state_dict["_extra_state"]["model_params"] = old_model_params
420424
if missing_keys:
421425
target_state_dict = self.wrapper.state_dict()
422426
slim_keys = []

0 commit comments

Comments
 (0)