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

ValueError: Input and output must have the same number of spatial dimensions, but got input with with spatial dimensions of [256, 256] and output size of torch.Size([1, 256, 256, 3]). Please provide input tensor in (N, C, d1, d2, ...,dK) format and output size in (o1, o2, ...,oK) format. #34

Open
zdw9915 opened this issue Dec 1, 2022 · 7 comments

Comments

@zdw9915
Copy link

zdw9915 commented Dec 1, 2022

ValueError: Input and output must have the same number of spatial dimensions, but got input with with spatial dimensions of [256, 256] and output size of torch.Size([1, 256, 256, 3]). Please provide input tensor in (N, C, d1, d2, ...,dK) format and output size in (o1, o2, ...,oK) format.

@AllesOderNicht
Copy link

我遇到了相同的问题

@YourHarbour
Copy link

YourHarbour commented Feb 20, 2023

我遇到了相同的问题

有解决吗
我也遇到了这个问题

@PriscillaPio
Copy link

It worked for me after I changed the shape of label from (256, 256, 3) to (256, 256). Make sure to save the labels in grayscale when you crop them

@zdw9915
Copy link
Author

zdw9915 commented Mar 17, 2023

I seem to have found a workaround, changing the bit depth of the label to 8

@zdw9915
Copy link
Author

zdw9915 commented Mar 17, 2023

It worked for me after I changed the shape of label from (256, 256, 3) to (256, 256). Make sure to save the labels in grayscale when you crop them

Thank you very much

@khawlaAlaoui
Copy link

I seem to have found a workaround, changing the bit depth of the label to 8

Can you please tell me why and how ?

@yclqwq
Copy link

yclqwq commented Apr 14, 2024

It worked for me after I changed the shape of label from (256, 256, 3) to (256, 256). Make sure to save the labels in grayscale when you crop them

Thank you very much

您好,您只是改了这一个地方就跑代码了吗,可以给我一些指导或者给我您的数据集吗(DISFN)我的邮件是:[[email protected]]

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

6 participants