Incubator-mxnet: How to get the outputs of hidden layers when using Module for training

Created on 13 Apr 2017  路  2Comments  路  Source: apache/incubator-mxnet

I need to get the output of a hidden layer during inference. I use Module for training. After the training is done I can use

mod.forward(DataBatch)
output = mod.get_outputs() 

to get the output of the entire network. But I also want to inspect the output of a hidden layer. Is there any way to access that using Module's methods?

Most helpful comment

@sumethy Please checkout the tutorial for the same here
https://github.com/dmlc/mxnet-notebooks/blob/master/python/how_to/predict.ipynb

Read this tutorial fully to understand how to access the internal features and other cool features of MxNet, you will find your answer under the section "Extracting Features"

All 2 comments

@sumethy Please checkout the tutorial for the same here
https://github.com/dmlc/mxnet-notebooks/blob/master/python/how_to/predict.ipynb

Read this tutorial fully to understand how to access the internal features and other cool features of MxNet, you will find your answer under the section "Extracting Features"

@bhokaal2k Got it. Thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ranti-iitg picture ranti-iitg  路  3Comments

sbodenstein picture sbodenstein  路  3Comments

qiliux picture qiliux  路  3Comments

seongkyun picture seongkyun  路  3Comments

dmadeka picture dmadeka  路  3Comments