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 0108b9f commit 84b2da2Copy full SHA for 84b2da2
tutorials/06 - Recurrent Neural Network/main.py
@@ -64,7 +64,7 @@ def forward(self, x):
64
for epoch in range(num_epochs):
65
for i, (images, labels) in enumerate(train_loader):
66
images = Variable(images.view(-1, sequence_length, input_size))
67
- labels = Variable(labels).cuda()
+ labels = Variable(labels)
68
69
# Forward + Backward + Optimize
70
optimizer.zero_grad()
@@ -90,4 +90,4 @@ def forward(self, x):
90
print('Test Accuracy of the model on the 10000 test images: %d %%' % (100 * correct / total))
91
92
# Save the Model
93
-torch.save(rnn, 'rnn.pkl')
+torch.save(rnn, 'rnn.pkl')
0 commit comments