As mentioned in the above comment, register_backward_hook gives you the gradient with respect to the input and output. If you want the gradients for the specific parameters (weights and bias), then you need to use the register_hook method.
Again, register_forward_hook and register_backward_hook are only available for modules while register_hook is available only for parameters