Skip to content

Commit

Permalink
Search key change from bn to .bn.
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhanbsolak committed Sep 16, 2024
1 parent 545fa96 commit 1e8ad35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -1529,7 +1529,7 @@ def update_old_model_params(model_path, model_new):
if k.startswith('module.'):
model_old['state_dict'][k[7:]] = old_dict[k]
for new_key, new_val in model_new.state_dict().items():
if new_key not in model_old['state_dict'] and 'bn' not in new_key:
if new_key not in model_old['state_dict'] and '.bn.' not in new_key:
is_model_old = True
model_old['state_dict'][new_key] = new_val
if 'compression_sched' in model_old:
Expand Down

0 comments on commit 1e8ad35

Please sign in to comment.