bearxwm / FLFuse-Net

The code and pretrained models of paper 'FLFuse-Net: A Fast and Lightweight Infrared and Visible Image Fusion Network Via Feature Flow and Edge Compensation for Salient Information'.
8 stars 1 forks source link

ImportError: cannot import name 'MyRandomCrop' from 'torchvision.transforms' (/home/server2/anaconda3/lib/python3.7/site-packages/torchvision/transforms/__init__.py) #2

Closed Zhou-momo closed 1 year ago

Zhou-momo commented 1 year ago

When I made an error“ImportError: cannot import name 'MyRandomCrop' from 'torchvision.transforms' (/home/server2/anaconda3/lib/python3.7/site-packages/torchvision/transforms/init.py)” running test.py, can I ask the author for any solution?

bearxwm commented 1 year ago

This is because our previous code modified the code of 'torchvision', which is incompatible with the PyTorch version 1.8 and later. We have fixed this bug and made many other modifications. You can refer to the latest code.

Zhou-momo commented 1 year ago

This is because our previous code modified the code of 'torchvision', which is incompatible with the PyTorch version 1.8 and later. We have fixed this bug and made many other modifications. You can refer to the latest code.

Thank you to the author for your answer.