Can I calculate loss using intermediate feature maps obtained by forward hook?

Hi, I wonder if loss will backward successfully when using feature maps obtained by forward hook.

Yes, that should be possible as long as you don’t detach the output activations.

1 Like