Skip to content

Commit

Permalink
move to() outside one level
Browse files Browse the repository at this point in the history
  • Loading branch information
misko committed Aug 15, 2024
1 parent d0590af commit 3bcc365
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/fairchem/core/trainers/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -605,11 +605,10 @@ def load_checkpoint(
target_key = key

if target_key in self.normalizers:
mkeys = (
self.normalizers[target_key]
.load_state_dict(checkpoint["normalizers"][key])
.to(map_location)
mkeys = self.normalizers[target_key].load_state_dict(
checkpoint["normalizers"][key]
)
self.normalizers[target_key].to(map_location)
assert len(mkeys.missing_keys) == 0
assert len(mkeys.unexpected_keys) == 0

Expand Down

0 comments on commit 3bcc365

Please sign in to comment.