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

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

Open
sonnystalin opened this issue Jul 5, 2024 · 4 comments

Comments

@sonnystalin
Copy link

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
Copy link
Owner

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

@sonnystalin
Copy link
Author

sonnystalin commented Jul 17, 2024

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
Copy link
Author

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
Copy link
Owner

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

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