MANIK_SHARMA_ed15b02:

Is there are any workaround for this?


You could add these functional calls as new nn.Modules, but I wouldn’t recommend it.



 MANIK_SHARMA_ed15b02:

Therefore it is necessary to access the submodule if its gradients are to be visualized.


I’m not familiar with the necessary steps for GradCAM.
If you need to get gradients of parameters, you could either loop all parameters and access their param.grad attribute or register hooks for it.
Changing the forward pass shouldn’t change the gradient access, should it?