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?
@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
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"