Extracting and using features from a pretrained model

An example towards how to use forward_hooks is given in this post