How to access intermediate layer in a pretrained model and sequence layers?

You can use forward hooks to get the output of a specific module.
This post gives you an example. Let me know, if you get stuck.

1 Like