Torchvision.utils.save_image() error?

I’m trying to save images that are read through torchvision.datasets.ImageFolder(). But if I save with only image tensor and filename arguments, it saves normalized images. And if I try to save with additional arguments like normalize=True, it returns Typeerror. Below is my code and error. How can I save images without normalization?

Do you want to save the original pictures?
the transform ToTensor return tensor that range from (0,1)
while save_image accept tensor range(-1,1)

1 Like

thank you so much :slight_smile:

But why is the argument “normalize” is not working?

I think maybe you should update your torchvision.

1 Like