From 8778be48c0ffeca4a8aaefb06a135c50c4e0899d Mon Sep 17 00:00:00 2001 From: Ali Khaled <92372027+AliKhaled11@users.noreply.github.com> Date: Fri, 11 Nov 2022 22:11:53 +0200 Subject: [PATCH] Update Part 2 - Neural Networks in PyTorch (Exercises).ipynb updated ```dataiter.next()``` to ```next(dataiter)``` as the former code will cause an attribute error --- .../Part 2 - Neural Networks in PyTorch (Exercises).ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intro-to-pytorch/Part 2 - Neural Networks in PyTorch (Exercises).ipynb b/intro-to-pytorch/Part 2 - Neural Networks in PyTorch (Exercises).ipynb index f003c5f4a4..b6591c9c21 100644 --- a/intro-to-pytorch/Part 2 - Neural Networks in PyTorch (Exercises).ipynb +++ b/intro-to-pytorch/Part 2 - Neural Networks in PyTorch (Exercises).ipynb @@ -105,7 +105,7 @@ "outputs": [], "source": [ "dataiter = iter(trainloader)\n", - "images, labels = dataiter.next()\n", + "images, labels = next(dataiter)\n", "print(type(images))\n", "print(images.shape)\n", "print(labels.shape)"