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

torchvision 0.17 issue #649

Open
TornjV opened this issue Nov 15, 2023 · 4 comments
Open

torchvision 0.17 issue #649

TornjV opened this issue Nov 15, 2023 · 4 comments

Comments

@TornjV
Copy link
Contributor

TornjV commented Nov 15, 2023

Using torchvision.transforms.functional_tensor errors out in torchvision 0.17

https://github.com/XPixelGroup/BasicSR/blob/033cd6896d898fdd3dcda32e3102a792efa1b8f4/basicsr/data/degradations.py#L8C6-L8C17

image
@bneigher
Copy link

+1

@haobo724
Copy link

just change the line 8 in file degradations.py
from from torchvision.transforms.functional_tensor import rgb_to_grayscale

to from torchvision.transforms.functional import rgb_to_grayscale

@OverStruck
Copy link

how come this simple fix hasn't been implemented in the repo?

@f-batiri
Copy link

For anyone looking here for a solution using command line (in some cases like using this in Docker, manual edit is not an option), there is a lazy fix for this, originally mentioned here:

sed -i 's/from torchvision.transforms.functional_tensor import rgb_to_grayscale/from torchvision.transforms.functional import rgb_to_grayscale/' $(python3 -c 'import sysconfig; print(sysconfig.get_paths()["purelib"])')/basicsr/data/degradations.py

However, I really hope, someone will push a release with this fix.

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