Solved by ptrblck in post #2 
              
              
                ToPILImage() should work. 
I’m not sure what you are passing as the mode argument, but this small code snippet works fine: 
x = torch.randn(1, 3, 224, 224)
trans = torchvision.transforms.ToPILImage()
out = trans(x[0])
out.show()