How 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.