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

Can FullGrad be applied to ResNet? #13

Open
yikekk opened this issue Nov 8, 2021 · 4 comments
Open

Can FullGrad be applied to ResNet? #13

yikekk opened this issue Nov 8, 2021 · 4 comments

Comments

@yikekk
Copy link

yikekk commented Nov 8, 2021

Sorry to bother you, I wonder whether FullGrad can be applied to ResNet? I've tried Simple FullGrad on ResNet-50 and it succeeded. But when I try FullGrad on ResNet-50, an error about dimensionality appeared.

@suraj-srinivas
Copy link
Collaborator

Hi, the example code provided (dump_images.py) indeed works on resnet models. What is your input dimensionality?

@yikekk
Copy link
Author

yikekk commented Nov 9, 2021

My input dimensionality is [1,3,224,224]. Actually, when I use normal resnet-50, it works. But when I use ResNet-50 from https://github.com/szq0214/MEAL-V2, an error occurs.

RuntimeError: The expanded size of the tensor (256) must match the existing size (64) at non-singleton dimension 1. Target sizes: [1, 256, 56, 56]. Tensor sizes: [1, 64, 1, 1]

@suraj-srinivas
Copy link
Collaborator

Does this error occurs only on fullgrad and not on simple fullgrad?

@yikekk
Copy link
Author

yikekk commented Nov 9, 2021

Yes, this error occurs on fullgrad and smooth_fullgrad

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