From f988562f0910ca7569b2e35757ddf02f2865583b Mon Sep 17 00:00:00 2001 From: BeniaminC Date: Wed, 31 May 2023 11:38:53 -0700 Subject: [PATCH 1/2] Added matplotlib dependency to blitz tutorial. --- beginner_source/blitz/cifar10_tutorial.py | 3 --- beginner_source/deep_learning_60min_blitz.rst | 5 +++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/beginner_source/blitz/cifar10_tutorial.py b/beginner_source/blitz/cifar10_tutorial.py index 5a9cde3f105..4449bf590fb 100644 --- a/beginner_source/blitz/cifar10_tutorial.py +++ b/beginner_source/blitz/cifar10_tutorial.py @@ -94,15 +94,12 @@ import numpy as np # functions to show an image - - def imshow(img): img = img / 2 + 0.5 # unnormalize npimg = img.numpy() plt.imshow(np.transpose(npimg, (1, 2, 0))) plt.show() - # get some random training images dataiter = iter(trainloader) images, labels = next(dataiter) diff --git a/beginner_source/deep_learning_60min_blitz.rst b/beginner_source/deep_learning_60min_blitz.rst index 09ac232cc49..6c96c403455 100644 --- a/beginner_source/deep_learning_60min_blitz.rst +++ b/beginner_source/deep_learning_60min_blitz.rst @@ -20,11 +20,12 @@ Goal of this tutorial: - Understand PyTorch’s Tensor library and neural networks at a high level. - Train a small neural network to classify images -To run the tutorials below, make sure you have the `torch`_ and `torchvision`_ -packages installed. +To run the tutorials below, make sure you have the `torch`_, `torchvision`_, +and `matplotlib`_ packages installed. .. _torch: https://github.com/pytorch/pytorch .. _torchvision: https://github.com/pytorch/vision +.. _matplotlib: https://github.com/matplotlib/matplotlib .. toctree:: :hidden: From b34f12b877beee988cb8843db16b499dbef14f4e Mon Sep 17 00:00:00 2001 From: BeniaminC Date: Wed, 31 May 2023 17:54:13 -0700 Subject: [PATCH 2/2] Removed a modified file from pull request --- beginner_source/blitz/cifar10_tutorial.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/beginner_source/blitz/cifar10_tutorial.py b/beginner_source/blitz/cifar10_tutorial.py index 4449bf590fb..5a9cde3f105 100644 --- a/beginner_source/blitz/cifar10_tutorial.py +++ b/beginner_source/blitz/cifar10_tutorial.py @@ -94,12 +94,15 @@ import numpy as np # functions to show an image + + def imshow(img): img = img / 2 + 0.5 # unnormalize npimg = img.numpy() plt.imshow(np.transpose(npimg, (1, 2, 0))) plt.show() + # get some random training images dataiter = iter(trainloader) images, labels = next(dataiter)