You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/06/24 00:02:27 UTC

[GitHub] szha commented on issue #11379: support shared parameter in summary

szha commented on issue #11379: support shared parameter in summary
URL: https://github.com/apache/incubator-mxnet/pull/11379#issuecomment-399718503
 
 
   For network like this:
   ```python
   net2 = nn.Sequential()
   with net2.name_scope():
       net2.add(nn.Embedding(40, 30))
       net2.add(gluon.rnn.LSTM(30))
       net2.add(nn.Dense(40, flatten=False, params=net2[0].params))
   net2.initialize()
   net2.summary(mx.nd.ones((80, 32)))
   ```
   the printed summary looks like:
   ```bash
   --------------------------------------------------------------------------------
           Layer (type)                                Output Shape         Param #
   ================================================================================
                  Input                                    (80, 32)               0
            Embedding-1                                (80, 32, 30)            1200
                 LSTM-2                                (80, 32, 30)            7440
                Dense-3                                (80, 32, 40)            1240
   ================================================================================
   Total params: 9880
   Trainable params: 9880
   Non-trainable params: 0
   Shared params: 1200          <<<<< added in this PR
   --------------------------------------------------------------------------------
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services