Hi,
I want to convert a tensor of images to PIL images.
import torch
import torchvision.transforms as transforms
tran1 = transforms.ToPILImage()
x = torch.randn(64, 3, 32, 32) # 64 images here
pil_image_single = tran1(x[0]) # this works fine
pil_image_batch = tran1(x) # this does not work
Can somebody tell me if there is any efficient way to do the final line without going through a loop?
Thanks