Manually changing the delta in the middle of backward

I don’t understand how to change manually the delta error of a specific layer in the middle of the backward process, and I need that the backpropgation will continue with the changed value.


Thanks a lot

1 Like


You can use hooks for that. In particular, you can use register_hook(fn) on any Tensor in the middle of your computation to inspect and optionally change the gradient flowing for it.