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 7262c21 commit 2793639Copy full SHA for 2793639
beginner_source/blitz/cifar10_tutorial.py
@@ -252,7 +252,7 @@ def forward(self, x):
252
# calculate outputs by running images through the network
253
outputs = net(images)
254
# the class with the highest energy is what we choose as prediction
255
- _, predicted = torch.max(outputs.data, 1)
+ _, predicted = torch.max(outputs, 1)
256
total += labels.size(0)
257
correct += (predicted == labels).sum().item()
258
0 commit comments