Skip to content

Commit f988562

Browse files
committed
Added matplotlib dependency to blitz tutorial.
1 parent 963a29d commit f988562

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

beginner_source/blitz/cifar10_tutorial.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,12 @@
9494
import numpy as np
9595

9696
# functions to show an image
97-
98-
9997
def imshow(img):
10098
img = img / 2 + 0.5 # unnormalize
10199
npimg = img.numpy()
102100
plt.imshow(np.transpose(npimg, (1, 2, 0)))
103101
plt.show()
104102

105-
106103
# get some random training images
107104
dataiter = iter(trainloader)
108105
images, labels = next(dataiter)

beginner_source/deep_learning_60min_blitz.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ Goal of this tutorial:
2020
- Understand PyTorch’s Tensor library and neural networks at a high level.
2121
- Train a small neural network to classify images
2222

23-
To run the tutorials below, make sure you have the `torch`_ and `torchvision`_
24-
packages installed.
23+
To run the tutorials below, make sure you have the `torch`_, `torchvision`_,
24+
and `matplotlib`_ packages installed.
2525

2626
.. _torch: https://github.com/pytorch/pytorch
2727
.. _torchvision: https://github.com/pytorch/vision
28+
.. _matplotlib: https://github.com/matplotlib/matplotlib
2829

2930
.. toctree::
3031
:hidden:

0 commit comments

Comments
 (0)