diff --git a/examples/notebooks/FashionMNIST.ipynb b/examples/notebooks/FashionMNIST.ipynb index d06470e507b..9f53af7e4bc 100644 --- a/examples/notebooks/FashionMNIST.ipynb +++ b/examples/notebooks/FashionMNIST.ipynb @@ -605,7 +605,7 @@ "classes = ['T-shirt/top','Trouser','Pullover','Dress','Coat','Sandal','Shirt','Sneaker','Bag','Ankle Boot']\n", "# creating iterator for iterating the dataset\n", "dataiter = iter(val_loader)\n", - "images, labels = dataiter.next()\n", + "images, labels = next(dataiter)\n", "images_arr = []\n", "labels_arr = []\n", "pred_arr = []\n", @@ -621,7 +621,7 @@ "# plotting the results\n", "fig = plt.figure(figsize=(25,4))\n", "for i in range(10):\n", - " ax = fig.add_subplot(2, 20/2, i+1, xticks=[], yticks=[])\n", + " ax = fig.add_subplot(2, 20//2, i+1, xticks=[], yticks=[])\n", " ax.imshow(images_arr[i].resize_(1, 28, 28).numpy().squeeze())\n", " ax.set_title(\"{} ({})\".format(classes[pred_arr[i]], classes[labels_arr[i]]),\n", " color=(\"green\" if pred_arr[i]==labels_arr[i] else \"red\"))"