Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 655c6df commit f73f67eCopy full SHA for f73f67e
tutorials/01-basics/pytorch_basics/main.py
@@ -150,7 +150,7 @@ def __len__(self):
150
resnet.fc = nn.Linear(resnet.fc.in_features, 100) # 100 is for example.
151
152
# For test.
153
-images = Variable(torch.randn(10, 3, 256, 256))
+images = Variable(torch.randn(10, 3, 224, 224))
154
outputs = resnet(images)
155
print (outputs.size()) # (10, 100)
156
@@ -162,4 +162,4 @@ def __len__(self):
162
163
# Save and load only the model parameters(recommended).
164
torch.save(resnet.state_dict(), 'params.pkl')
165
-resnet.load_state_dict(torch.load('params.pkl'))
+resnet.load_state_dict(torch.load('params.pkl'))
0 commit comments