Created
August 19, 2018 03:05
-
-
Save omarsar/d87108810a2fb98f43cab38f4403632a 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