Let’s say I have a function that receives:

a network module, containing multiple layers
the output of that network module, from passing in a batch
nothing else

… is there any way of somehow accessing the intermediate results in the intervening layers, from passing the batch through those layers, to get the output?
I’m wondering if maybe autograd stores this information somewhere/somehow, so we can access it ourselves?