Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError: <InterpolationMode.BILINEAR: 'bilinear'> #70

Open
talenz opened this issue May 17, 2022 · 4 comments
Open

KeyError: <InterpolationMode.BILINEAR: 'bilinear'> #70

talenz opened this issue May 17, 2022 · 4 comments

Comments

@talenz
Copy link

talenz commented May 17, 2022

when running train_ofa_net.py

torch 1.11.0
torchvision 0.12.0

@Shadow1300
Copy link

I've had this problem, too.

@LiangLiu-ic
Copy link

Me, too.

@izenderi
Copy link

Same here:

Error:

(once-for-all) $ python train_ofa_net.py
...
File ".../once-for-all/ofa/utils/my_dataloader/my_random_resize_crop.py", line 86, in __repr__
    interpolate_str = _pil_interpolation_to_str[self.interpolation]
KeyError: <InterpolationMode.BILINEAR: 'bilinear'>

Env:

...
torch              1.12.1
torchvision        0.13.1
...

@C0NGTRI123
Copy link

I fix that use comment line 87 to line 97 or set config value interpolate_str in line 87 like that:

interpolate_str = _pil_interpolation_to_str[self.interpolation]

change to:

interpolate_str = "PIL.Image.BILINEAR"

I think they wrong in config str, so I think fix that not impact in training

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants