I’ve created a small example storing the grad_output into a list in your model.
class MyModel(nn.Module):
    def __init__(self):
        super(MyModel, self).__init__()
        self.fc1 = nn.Linear(10, 1)
        
        self.gradients = []
        self.fc1.register_backward_hook(self.save_gradients)
        
    def forward(self, x):
        x = self.fc1(x)
        return F.sigmoid(x)

    def save_gradients(self, module, grad_input, grad_output):
        self.gradients.append(grad_output[0].item())

x = torch.randn(1, 10)
model = MyModel()
output = model(x)
output.backward()

print(model.gradients)

Would this work for you or do you want to register the hook with a specific tensor?