Created
August 24, 2019 17:46
-
-
Save omarsar/1afe679dea1455d1f9ed1af1126eff37 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
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))) | |
## get some random training images | |
dataiter = iter(trainloader) | |
images, labels = dataiter.next() | |
## show images | |
imshow(torchvision.utils.make_grid(images)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment