MCPcopy Index your code
hub / github.com/pytorch/tutorials / imshow

Function imshow

beginner_source/blitz/cifar10_tutorial.py:101–105  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

99
100
101def imshow(img):
102 img = img / 2 + 0.5 # unnormalize
103 npimg = img.numpy()
104 plt.imshow(np.transpose(npimg, (1, 2, 0)))
105 plt.show()
106
107
108# get some random training images

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected