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

Patch size and n_patches calculation issue when grid is specified #56

Open
alabamagan opened this issue Jun 30, 2023 · 2 comments
Open

Comments

@alabamagan
Copy link

https://github.com/jeonsworld/ViT-pytorch/blob/460a162767de1722a014ed2261463dbbc01196b6/models/modeling.py#L132C1-L136C31

Here it seems the calculation for n_patches and patch_size are incorrect.
I think if 16 x 16 patches were assumed, the grid size is already determined? Or am I mistaken about the purpose of the grid config?

@cai-wenbo
Copy link

I just read the code and had the same question. Then found this unsolved issue, I'm quite confirmed that this piece of code is of wrong logic.

@alabamagan
Copy link
Author

I just read the code and had the same question. Then found this unsolved issue, I'm quite confirmed that this piece of code is of wrong logic.

Yeah I end up rewriting my own version. I end up using implementation by another person: https://github.com/junyuchen245/ViT-V-Net_for_3D_Image_Registration_Pytorch

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