diff --git a/cifar/cifar10_tutorial.py b/cifar/cifar10_tutorial.py index 2154e3634..114e8c5fa 100644 --- a/cifar/cifar10_tutorial.py +++ b/cifar/cifar10_tutorial.py @@ -110,7 +110,7 @@ def imshow(img): # get some random training images dataiter = iter(trainloader) -images, labels = dataiter.next() +images, labels = next(dataiter) # show images imshow(torchvision.utils.make_grid(images)) @@ -219,7 +219,7 @@ def forward(self, x): # Okay, first step. Let us display an image from the test set to get familiar. dataiter = iter(testloader) -images, labels = dataiter.next() +images, labels = next(dataiter) # print images imshow(torchvision.utils.make_grid(images)) diff --git a/cifar/requirements.txt b/cifar/requirements.txt index 6e3d1baa9..f56067b94 100644 --- a/cifar/requirements.txt +++ b/cifar/requirements.txt @@ -1,3 +1,3 @@ -torchvision==0.4.0 +torchvision pillow>=7.1.0 matplotlib