BasicSR icon indicating copy to clipboard operation
BasicSR copied to clipboard

torchvision.transforms.functional import error fix for torchvision 0.17

Open HaiderSultanArc opened this issue 1 year ago • 2 comments

HaiderSultanArc avatar Feb 20 '24 13:02 HaiderSultanArc

Please approve this PR

IlyesBenAmara avatar Mar 04 '24 09:03 IlyesBenAmara

I think this should be :

try:
    from torchvision.transforms.functional_tensor import rgb_to_grayscale
except ModuleNotFoundError:
    from torchvision.transforms.functional import rgb_to_grayscale

to make it more compatible with older torchvision before we confirm to drop the older supports❓

tomy128 avatar Mar 31 '24 05:03 tomy128