Extracting features from specific layers on a trained network

You could return this activation in your forward method or alternatively use forward hooks as described here.

2 Likes