Hi,
If you use .detach() in the hook, then no the graph will not be kept.
But if you don’t do that, then yes, the Tensors will require gradients just like the ones in the forward and you can do whatever you want there