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

about test #136

Open
yanghan0617 opened this issue Jan 5, 2024 · 1 comment
Open

about test #136

yanghan0617 opened this issue Jan 5, 2024 · 1 comment

Comments

@yanghan0617
Copy link

When I was testing, I encountered the following problem:

File "F:\MPRNet-main\Deraining\MPRNet.py", line 187, in forward
x = x + y
RuntimeError: The size of tensor a (480) must match the size of tensor b (481) at non-singleton dimension 3

Please tell me how to solve it.

@Eslzzyl
Copy link

Eslzzyl commented Jan 13, 2024

According to #78 and #14, you can run demo.py instead of Deraining/test.py. test.py only works on the given testing dataset which has resolution of 480x320, while demo.py has a block of code to handle images whose resolution is not a multiple of 16.

Here is an example worked for me:

# Rain100H
python demo.py \
    --input_dir ./Deraining/Datasets/test/Rain100H/input \
    --result_dir ./Deraining/results/Rain100H \
    --task Deraining

# Rain100L
python demo.py \
    --input_dir ./Deraining/Datasets/test/Rain100L/input \
    --result_dir ./Deraining/results/Rain100L \
    --task Deraining

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

2 participants