Skip to content

Commit 9cce6c6

Browse files
authored
Update main-gpu.py
1 parent 4bf140b commit 9cce6c6

File tree

1 file changed

+1
-1
lines changed
  • tutorials/01-basics/feedforward_neural_network

1 file changed

+1
-1
lines changed

tutorials/01-basics/feedforward_neural_network/main-gpu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def forward(self, x):
5757
for epoch in range(num_epochs):
5858
for i, (images, labels) in enumerate(train_loader):
5959
# Convert torch tensor to Variable
60-
images = Variable(images.view(-1, 28*28).cuda(), requires_grad=True)
60+
images = Variable(images.view(-1, 28*28).cuda())
6161
labels = Variable(labels.cuda())
6262

6363
# Forward + Backward + Optimize

0 commit comments

Comments
 (0)