How to reverse the action of .unsqueeze(0)
I have tried to use
torchvision.transforms.ToPILImage()(x)
to change tensor to PIL .
In 3rd dimension , it works correctly giving right output
torch.Size([3, 224, 224])
(224, 224, 3)

but when using 4 dimension tensor gives error saying
torch.Size([1, 3, 224, 224])
ValueError: pic should be 2/3 dimensional. Got 4 dimensions.
How can i reverse tensor [1, 3, 224, 224] to [3, 224, 224]  ?
Thank you for helping