cxzhou95 / XLSR

PyTorch implementation of paper "Extremely Lightweight Quantization Robust Real-Time Single-Image Super Resolution for Mobile Devices"
MIT License
56 stars 9 forks source link

RuntimeError: stack expects each tensor to be equal size, but got [3, 452, 680] at entry 0 and [3, 484, 680] at entry 1 #2

Closed JimmyLauren closed 2 years ago

JimmyLauren commented 3 years ago

Hi, Thanks for your sharing. I tested the model you shared, the performance looked good. But when i turn to the training process, it came up with pytorch stack error like this. Any advice how to resolve this? BTW, can you share ur training environment and ur pytorch version? image

cxzhou95 commented 3 years ago

Did you modify the codes of dataset.py (e.g., line 46 crop_size)? My environment is

ubuntu | 20.04 GPU | RTX 3060 python | 3.8.5 pytorch | 1.10.0 torchvision | 0.11.0 pyyaml | 5.3.1 opencv-python | 4.5.2.52 numpy | 1.19.2 matplotlib | 3.3.2

But I think any PyTorch whose version >= 1.6.0 is okay for the training and testing except quantization.

JimmyLauren commented 3 years ago

Hi, thanks for reply. Last time i didn't use data augmentation. With data --augment attached to training command line the error didn't show.

cxzhou95 commented 3 years ago

Good!

JimmyLauren @.***>于2021年10月21日 周四下午4:31写道:

Hi, thanks for reply. Last time i didn't use data augmentation. With data --augment attached to training command line the error didn't show.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/cxzhou95/XLSR/issues/2#issuecomment-948382041, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIHI4L45EPSJYLZOGMEAO7TUH7FWFANCNFSM5F64UPQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.