Skip to content

Commit 8475fd9

Browse files
kiersten-stokesSvetlana Karslioglu
and
Svetlana Karslioglu
authored
Change variable name from net to model (#2243)
Co-authored-by: Svetlana Karslioglu <svekars@fb.com>
1 parent 177c4a4 commit 8475fd9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

recipes_source/recipes/saving_and_loading_a_general_checkpoint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def forward(self, x):
129129
#
130130

131131
model = Net()
132-
optimizer = optim.SGD(net.parameters(), lr=0.001, momentum=0.9)
132+
optimizer = optim.SGD(model.parameters(), lr=0.001, momentum=0.9)
133133

134134
checkpoint = torch.load(PATH)
135135
model.load_state_dict(checkpoint['model_state_dict'])

0 commit comments

Comments
 (0)