From 29f9730950e12ae25834c73fa066b668f151926e Mon Sep 17 00:00:00 2001 From: Yen-Chen Lin Date: Fri, 13 Jan 2023 22:29:46 -0500 Subject: [PATCH] Fix syntax and dependency error for cifar --- cifar/cifar10_tutorial.py | 4 ++-- cifar/requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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