Skip to content

Commit 8778be4

Browse files
authored
Update Part 2 - Neural Networks in PyTorch (Exercises).ipynb
updated ```dataiter.next()``` to ```next(dataiter)``` as the former code will cause an attribute error
1 parent 855fb9a commit 8778be4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

intro-to-pytorch/Part 2 - Neural Networks in PyTorch (Exercises).ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
"outputs": [],
106106
"source": [
107107
"dataiter = iter(trainloader)\n",
108-
"images, labels = dataiter.next()\n",
108+
"images, labels = next(dataiter)\n",
109109
"print(type(images))\n",
110110
"print(images.shape)\n",
111111
"print(labels.shape)"

0 commit comments

Comments
 (0)