Skip to content

Commit

Permalink
Merge pull request huggingface#14 from kevinlin19910227/kevinlin19910…
Browse files Browse the repository at this point in the history
…227-patch-1

Update 17_save_load.py
  • Loading branch information
patrickloeber committed Jan 5, 2023
2 parents cc18036 + f4735ad commit 63585a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 17_save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def forward(self, x):
torch.save(checkpoint, FILE)

model = Model(n_input_features=6)
optimizer = optimizer = torch.optim.SGD(model.parameters(), lr=0)
optimizer = torch.optim.SGD(model.parameters(), lr=0)

checkpoint = torch.load(FILE)
model.load_state_dict(checkpoint['model_state'])
Expand Down

0 comments on commit 63585a0

Please sign in to comment.