Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
agosztolai authored Dec 6, 2023
1 parent cb75f38 commit 5fa052e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MARBLE/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,8 @@ def load_model(self, loadpath):
self._epoch = checkpoint["epoch"]
self.load_state_dict(checkpoint["model_state_dict"])
self.optimizer_state_dict = checkpoint["optimizer_state_dict"]
self.losses = checkpoint["losses"]
if hatattr(self, 'losses'):
self.losses = checkpoint["losses"]

def save_model(self, optimizer, losses, outdir=None, best=False, timestamp=""):
"""Save model."""
Expand Down

0 comments on commit 5fa052e

Please sign in to comment.