I have an image data named Img, and it is in ‘torch.FloatTensor’ format, I tried to use torchvision.transforms and/or matplotlib to display i, but I failed.
Can anyone tell me how I can do it?
Here are some extra info regarding my Image data:
print(type( Img ))
(1L, 3L, 128L, 128L)
import torchvision.models as models import torchvision.transforms as transforms import torch.nn as nn import torch import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt pilTrans = transforms.ToPILImage() pilImg = pilTrans(Img)
imgplot = plt.imshow(Img)
But none of them gets me anywhere.
Thank you for your!