ViT-pytorch icon indicating copy to clipboard operation
ViT-pytorch copied to clipboard

Patch size and n_patches calculation issue when grid is specified

Open alabamagan opened this issue 1 year ago • 2 comments

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?

alabamagan avatar Jun 30 '23 02:06 alabamagan