You could register a forward hook to the layer you would like to get the activations from.
Have a look at this example 15.
Another approach would be to modify the forward method and return the desired activation.