You could use forward hooks to get the output activations of specific layers as seen in this post 13.
Alternatively you could also return the intermediate activations from some layers directly in your forward method (if you are using a custom model).
Let me know, if this would work.