Number of trainable params in network #334
-
Hi, print(net) is giving the overview of the network, but doesnt give me the number of params that are being updated in each layer. for example, keras net.summary() gives the overview of shapes and number of params in each layer that could be trained/updated. is there a way to figure this out from gluon API ? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Gluon now supports a summary view too. https://mxnet.incubator.apache.org/versions/master/api/python/gluon/gluon.html?highlight=summary#mxnet.gluon.Block.summary |
Beta Was this translation helpful? Give feedback.
-
this does require an input i wud assume ? |
Beta Was this translation helpful? Give feedback.
-
yes, it requires an input. in order to get intermediate sizes, an input would always be needed even if it's from a static graph since gluon allows partial shape and deferred initialization. |
Beta Was this translation helpful? Give feedback.
-
Closing now. Let me know if you have more questions along the line. |
Beta Was this translation helpful? Give feedback.
Gluon now supports a summary view too. https://mxnet.incubator.apache.org/versions/master/api/python/gluon/gluon.html?highlight=summary#mxnet.gluon.Block.summary
The input to the method is the typical input such as a batch.