takimailto / BerDiff

18 stars 1 forks source link

RuntimeError: Tensors must have same number of dimensions: got 4 and 5 #7

Open sonnystalin opened 2 months ago

sonnystalin commented 2 months ago

Help, how to solve this question? unet.py", line 492, in forward x = th.cat([x, img], dim=1) RuntimeError: Tensors must have same number of dimensions: got 4 and 5

takimailto commented 1 month ago

It looks like the shapes of the tensor x and img do not match, and you can print their shapes for further debugging.

sonnystalin commented 1 month ago

I used my own data set for testing. The picture is 2-dimensional, but in the end there is always one more dimension and the value is 0. bb4d567e3c92ab37da1b8796306901f9 What parameters need to be changed to run your own data set using Windows system?

sonnystalin commented 1 month ago

Excuse me, have you ever processed the data set? Or use it directly? If you have done dimensionality reduction or other processing, could you please publish it? Thank you for your help sincerely! @takimailto

takimailto commented 1 month ago

Sorry, we have no further preprocessing. You can give me the shape of your data loader and I can use it to test.