changlin31 / DS-Net

(CVPR 2021, Oral) Dynamic Slimmable Network
228 stars 19 forks source link

UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum. #8

Closed Chauncey-Wang closed 3 years ago

Chauncey-Wang commented 3 years ago

Why I get an warning: /home/chauncey/.local/lib/python3.8/site-packages/torchvision/transforms/functional.py:364: UserWarning: Argument interpolation should be of type InterpolationMode instead of int. Please, use InterpolationMode enum. warnings.warn( when I use python3 -m torch.distributed.launch --nproc_per_node=1 train.py ./imagenet -c ./configs/mobilenetv1_bn_uniform.yml

changlin31 commented 3 years ago

This warning could be caused by the incompatibility of torchvision and pillow. Please provide your version of these two packages.

For reference, we use torchvision=0.8.2 and pillow=6.2.2.

Chauncey-Wang commented 3 years ago

This warning could be caused by the incompatibility of torchvision and pillow. Please provide your version of these two packages.

For reference, we use torchvision=0.8.2 and pillow=6.2.2.

Thank you for your quick reply. I use torchvision=0.9.1 and pillow=7.0.0. When I change their version as your suggestion, I solve this problem successfully. However, do you know which version of pillow is compatible with torchvision=0.9.1?

changlin31 commented 3 years ago

Try pillow=6.2.2, I think this works for all the torchvision versions.