Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Add unique number of parameters to summary output in Gluon Block (#12077
Browse files Browse the repository at this point in the history
)

* add unique parameters in summary output

* rebuild
  • Loading branch information
szhengac authored and szha committed Aug 9, 2018
1 parent 22bfbd7 commit 23b8f89
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions python/mxnet/gluon/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,12 @@ def _summary_hook(block, _, outputs):
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:
Expand Down

0 comments on commit 23b8f89

Please sign in to comment.