MPRNet icon indicating copy to clipboard operation
MPRNet copied to clipboard

about test

Open yanghan0617 opened this issue 2 years ago • 1 comments

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.

yanghan0617 avatar Jan 05 '24 07:01 yanghan0617

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

Eslzzyl avatar Jan 13 '24 03:01 Eslzzyl