Update:
So I found this answer Explicitly obtain gradients? today. What’s the difference between using register_backward_hook()
and grad = [p.grad for p in list(network.parameters())]
?
Update:
So I found this answer Explicitly obtain gradients? today. What’s the difference between using register_backward_hook()
and grad = [p.grad for p in list(network.parameters())]
?