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

CORnet inconsistent vector length #18

Open
heidamaria opened this issue Feb 18, 2022 · 1 comment
Open

CORnet inconsistent vector length #18

heidamaria opened this issue Feb 18, 2022 · 1 comment

Comments

@heidamaria
Copy link

Disclaimer: I do not know whether this is an issue with CORnet or with the THINGSvision wrapper for CORnet (see: https://github.com/ViCCo-Group/THINGSvision).

When running images through CORnet-z, the output layer for IT, as far as I understand from the CORnet preprint, is supposed to be 7x7x512 which when flattened would be a vector of length 25088. This is indeed what happens when apply_center_crop is set to True. However, when it is set to False, the output vectors of the same images (224 x 224 pixels), same layer/module, end up being of size 32768. This behavior does not appear to be layer specific, I e.g. also tested it for the V1 output layer and the vector length also depends on whether center crop is applied or not.

I am not quite sure if this is a bug or "normal" behavior that I then just do not quite understand.

@mschrimpf
Copy link
Member

Hi @heidamaria,
I think this is normal behavior: when input images are larger, the convolutional kernels will be applied more times, leading to larger activation vectors. E.g. a kernel of size 7x7 and no strides across a 224x224 image will be applied 32 times per row and column, but 48 times if the image is 336x336

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