mpapadomanolaki / UNetLSTM

GNU General Public License v2.0
23 stars 10 forks source link

RuntimeError: stack expects each tensor to be equal size, but got [2, 4, 32, 32] at entry 0 and [2, 4, 0, 32] at entry 1 #5

Open NIX369 opened 3 years ago

NIX369 commented 3 years ago

Hello, I was running your code on the OSCD Dataset and ran into this error:

RuntimeError: stack expects each tensor to be equal size, but got [2, 4, 32, 32] at entry 0 and [2, 4, 0, 32] at entry 1

I am fairly new to the PyTorch framework and I could use your help here.

Thank you.

Error

mpapadomanolaki commented 3 years ago

Hello,

It seems there is a problem when you try to extract the patches. Have you used the make_xys.py script to create the csv files? Your image batch should have a shape of [batchsize, number_of_dates, channels, height, width] and the label batch should have a shape of [batchsize, height, width].

I will also try to update the repository to check if there is anything that needs to be corrected.

NIX369 commented 3 years ago

Hi, I did use the make_xys.py script to create the training and validation csv files. Can you tell me where the changes has to be made here?? Thank you.

mpapadomanolaki commented 3 years ago

I updated the files a little bit, but just so that they can be easier to read. I did not find any error on how the batches are extracted. Maybe check again how your image folders are created as this is a crucial step. I have updated the instructions on the readme file. I hope this helps. Don't hesitate to ask me if you need anything else.

NIX369 commented 3 years ago

Okay sure, Thanks. I'll run it again and check for the results.