How to get the intermediate features from Alexnet

Hi, can anybody tell me how to use the forward hook function to get the intermediate features from Alexnet?

Here is an example for a custom model and you would need to replace the layer names in order to use it with AlexNet.