pytorch show image code example
Example 1: pytorch plt.imshow
plt.imshow(images[0].permute(1, 2, 0))
Example 2: show image in python
from PIL import Image
#read the image
im = Image.open("sample-image.png")
#show image
im.show()
plt.imshow(images[0].permute(1, 2, 0))
from PIL import Image
#read the image
im = Image.open("sample-image.png")
#show image
im.show()