Created
August 31, 2019 13:50
-
-
Save omarsar/1e3735aef70fb180c896291aa2232d16 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
## 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