You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/07/31 09:02:32 UTC

[GitHub] szha opened a new pull request #7265: add getitem to container layers

szha opened a new pull request #7265: add getitem to container layers
URL: https://github.com/apache/incubator-mxnet/pull/7265
 
 
   This is to add `__getitem__` to the container layers so that it's easier to locate the child layers along with their weights. For example:
   ```
   In [1]: from mxnet.gluon.model_zoo import vision as models
   
   In [2]: net = models.alexnet(True)
   
   In [3]: net.classifier
   Out[3]:
   HybridSequential(
     (0): Dense(4096, Activation(relu))
     (1): Dropout(p = 0.5)
     (2): Dense(4096, Activation(relu))
     (3): Dropout(p = 0.5)
     (4): Dense(1000, linear)
   )
   
   In [4]: net.classifier[2]
   Out[4]: Dense(4096, Activation(relu))
   
   In [5]: net.classifier[4]
   Out[5]: Dense(1000, linear)
   ```
 
----------------------------------------------------------------
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