MCPcopy Create free account
hub / github.com/pytorch/tutorials / imshow

Function imshow

beginner_source/introyt/introyt1_tutorial.py:382–385  ·  view source on GitHub ↗
(img)

Source from the content-addressed store, hash-verified

380 'deer', 'dog', 'frog', 'horse', 'ship', 'truck')
381
382def imshow(img):
383 img = img / 2 + 0.5 # unnormalize
384 npimg = img.numpy()
385 plt.imshow(np.transpose(npimg, (1, 2, 0)))
386
387
388# get some random training images

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected