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

Error: AssertionError: ground truth has different shape (torch.Size([2, 1, 512, 512])) from input (torch.Size([2, 1, 256, 256])) #73

Open
jhaggle opened this issue Nov 1, 2023 · 2 comments

Comments

@jhaggle
Copy link

jhaggle commented Nov 1, 2023

When changing patch_size from 256 to 512 and step size from 256 to 512 I get this error:

"Error: AssertionError: ground truth has different shape (torch.Size([2, 1, 512, 512])) from input (torch.Size([2, 1, 256, 256]))"

In this notebook:

https://github.com/bnsreenu/python_for_microscopists/blob/master/331_fine_tune_SAM_mito.ipynb

Is 256 hardcoded somewhere or why is this?

@haveragoyal
Copy link

@jhaggle.. Hey, did you solve it?

@venuss920
Copy link

Hi all, You can check the input of the SAM model what shape it takes of the masks and images. This can solve your problem, as I also got this problem and kept the size as 256. because the sam model takes inputs/output of (256,256) masks size.. You could correct me if I am wrong.

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

3 participants