I have defined the following transform.

transform_list_classifier = [transforms.ToPILImage(), transforms.Resize((64,64)),transforms.ToTensor(),transforms.Normalize((0.5, 0.5, 0.5), (0.5, 0.5, 0.5))]

transform_classifier = transforms.Compose(transform_list_classifier)
I have a variable called ‘fake_img’ which is a cuda tensor which I have converted into a CPU tensor as follows:
fake_img=((fake_b).data).cpu()
After the conversion the type of the tensor is as follows
[torch.FloatTensor of size 5x3x256x256]
When I apply the transform         fake_img=transform_classifier(fake_img)
I am getting the error

File “build/bdist.linux-x86_64/egg/torchvision/transforms.py”, line 560, in call
File “build/bdist.linux-x86_64/egg/torchvision/transforms.py”, line 610, in call
File “build/bdist.linux-x86_64/egg/torchvision/transforms.py”, line 96, in to_pil_image
TypeError: pic should be Tensor or ndarray. Got <class ‘torch.FloatTensor’>.

Any help would be appreciated.