Skip to content

Commit

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

* add unique parameters in summary output

* rebuild
  • Loading branch information
szhengac authored and szha committed Aug 9, 2018
1 parent 75ed568 commit e1227d3
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 e1227d3

Please sign in to comment.