I might still misunderstand the use case, but in your code example you are storing the gradients of the output of self.features:
    def forward(self, x):
        x = self.features(x)
        x.register_hook(self.save_gradient)

, while you are now comparing these gradients to the weight.grad.
Also, which model are you using?
I assumed it’s vgg16 and if that’s the case, features[30] is an nn.MaxPool2d layer, without any weight and bias parameters.