Skip to content

Commit 2f3d637

Browse files
committed
fix save_load
1 parent 557b26f commit 2f3d637

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/save_load_example/save_load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def save_load2():
119119

120120
torch.save(model, "model_whole.pt")
121121

122-
model2 = torch.load("model_whole.pt")
122+
model2 = torch.load("model_whole.pt", weights_only=False)
123123
y2 = model2(x)
124124
print(y2)
125125
assert torch.equal(y, y2)

0 commit comments

Comments
 (0)