You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2018/08/09 22:44:30 UTC
[incubator-mxnet] branch master updated: Add unique number of
parameters to summary output in Gluon Block (#12077)
This is an automated email from the ASF dual-hosted git repository.
zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 23b8f89 Add unique number of parameters to summary output in Gluon Block (#12077)
23b8f89 is described below
commit 23b8f8977174b85cb57fd625a9ccef30b4a47c0c
Author: Shuai Zheng <sz...@users.noreply.github.com>
AuthorDate: Thu Aug 9 15:44:21 2018 -0700
Add unique number of parameters to summary output in Gluon Block (#12077)
* add unique parameters in summary output
* rebuild
---
python/mxnet/gluon/block.py | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/python/mxnet/gluon/block.py b/python/mxnet/gluon/block.py
index f58b00d..af54c66 100644
--- a/python/mxnet/gluon/block.py
+++ b/python/mxnet/gluon/block.py
@@ -656,10 +656,12 @@ class Block(object):
trainable_params += summary[layer]['trainable']
shared_params += summary[layer]['shared']
print('='*80)
- print('Total params: ' + str(total_params))
- print('Trainable params: ' + str(trainable_params))
- print('Non-trainable params: ' + str(total_params - trainable_params))
- print('Shared params: ' + str(shared_params))
+ print('Parameters in forward computation graph, duplicate included')
+ print(' Total params: ' + str(total_params))
+ print(' Trainable params: ' + str(trainable_params))
+ print(' Non-trainable params: ' + str(total_params - trainable_params))
+ print('Shared params in forward computation graph: ' + str(shared_params))
+ print('Unique parameters in model: ' + str(total_params - shared_params))
print('-'*80)
finally:
for h in hooks: