Skip to content

Commit

Permalink
Rename "model_state_dict" to "model"
Browse files Browse the repository at this point in the history
  • Loading branch information
bveeramani committed Nov 22, 2022
1 parent 5f54406 commit 5984f1e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def train_func(config):
checkpoint_dict = session.get_checkpoint().to_dict()

# Load in model
model_state = checkpoint_dict["model_state_dict"]
model_state = checkpoint_dict["model"]
model.load_state_dict(model_state)

# Load in optimizer
Expand Down Expand Up @@ -146,7 +146,7 @@ def train_func(config):
checkpoint = Checkpoint.from_dict(
{
"epoch": epoch,
"model_state_dict": model.state_dict(),
"model": model.state_dict(),
"optimizer_state_dict": optimizer.state_dict(),
}
)
Expand Down

0 comments on commit 5984f1e

Please sign in to comment.