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 b4cd127 commit d6aa1f0Copy full SHA for d6aa1f0
beginner_source/blitz/cifar10_tutorial.py
@@ -160,7 +160,7 @@ def forward(self, x):
160
161
running_loss = 0.0
162
for i, data in enumerate(trainloader, 0):
163
- # get the inputs
+ # get the inputs; data is a list of [inputs, labels]
164
inputs, labels = data
165
166
# zero the parameter gradients
@@ -295,7 +295,7 @@ def forward(self, x):
295
#
296
# .. code:: python
297
298
-# inputs, labels = inputs.to(device), labels.to(device)
+# inputs, labels = data[0].to(device), data[1].to(device)
299
300
# Why dont I notice MASSIVE speedup compared to CPU? Because your network
301
# is realllly small.
0 commit comments