Get intermediate value from a block in nn.Sequential in a model

You could also use forward hooks to get the desired activations. Have a look at this example.

1 Like