junyanz / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch
Other
22.8k stars 6.29k forks source link

change image.bicubic to transformer bicubic to avoid output warning #1414

Closed happen2me closed 2 years ago

happen2me commented 2 years ago

The original code will frequently output an annoying warning message: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum.

Gwenn-LR commented 2 years ago

I had no problems to run a training before this pull request but now I have an error AttributeError: module 'torchvision.transforms' has no attribute 'InterpolationMode'.

I've recreated the environment from the environment.yml which use the 0.5.0 torchvision version, this error might come from this version since the class InterpolationMode was not implemented yet.

junyanz commented 2 years ago

We have updated the environment xml recently. https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix/blob/master/environment.yml