Closed Rui-Zhou-2 closed 1 year ago
When .backward() is called, any module within model (and the input) that has its required_grad=True will receive gradient. Then, you can simply extract it by calling .grad for that particular module.
Yes, but that only return true or false value.
is there any method to visualize the updating gradient on the feature map?
.requires_grad returns True or False. .grad returns the gradient.
Hi, thanks for your project,
I wonder how to extract the gradient that is being updated in the layers, without being measured on the model_output, is there any method for this?
Best regards