XPixelGroup / BasicSR

Open Source Image and Video Restoration Toolbox for Super-resolution, Denoise, Deblurring, etc. Currently, it includes EDSR, RCAN, SRResNet, SRGAN, ESRGAN, EDVR, BasicVSR, SwinIR, ECBSR, etc. Also support StyleGAN2, DFDNet.
https://basicsr.readthedocs.io/en/latest/
Apache License 2.0
6.88k stars 1.2k forks source link

Fixed the torchvision import #658

Closed MinasFakhori closed 9 months ago

MinasFakhori commented 9 months ago

What is the issue?

Torchvision renamed the functional_tensor file

What is the fix?

Changing the import to match the file name

from:

from torchvision.transforms.functional_tensor import rgb_to_grayscale

to:

from torchvision.transforms.functional import rgb_to_grayscale