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
ERF is smaller after changing the input image size #25
Comments
Hi, thanks for sharing the results. We would appreciate it if you could provide more details. For example, which weights have you loaded? |
Hi,thanks for reply. i followed the instruction in README.md, loaded the weights of RepLKNet-13 provided by this link. Resnet101 model is downloaded from torchvision. Then i modify the code line RepLKNet-pytorch/erf/visualize_erf.py Line 46 in 2b8b6c6
to |
Hi, I meet the similar problem, the only differencve is that i use RepLKNet-31B rather than RepLKNet-13. It also seems that resnet101 is larger than RepLKNet-31B when input size is set to be 224, above is RepLKNet-31B, below is resnet101. |
Hi, I think the image size is too small (but downstream tasks usually use much higher resolutions) so that every model's ERF can cover the whole image. In this case, the definition of ERF intuitively changes from "which part can the model see" to "in the region the model can see, which part does it mostly attend to". And in this case, the contribution scores have low variance and the normalization will make the ERF map look unnatural. |
Thanks so much! It really helps me understand it. |
I tried to view the effective receptive field, but when I used this !python erf/visualize_erf.py --model resnet101 --data_path /path/to/imagenet-1k --save_path resnet101_erf_matrix.npy Moreover, this code is very complex. If I want to visualize the erf for my custom model, how can I use this? My model combines CNN and transformer, but this code is very complex to understand and use by early learners like me. Maybe this code is suitable for experts. It could be great if you shared your knowledge and great work that can be understandable by basic learners like me. |
i changed the input size to 224×224,and compare RepLKNet with resnet101, it seems that resnet101 is larger than RepLKNet-13,
left is RepLKNet-13, right is resnet101
The text was updated successfully, but these errors were encountered: