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/03/14 07:14:57 UTC

[GitHub] feevos opened a new issue #10101: gluon feature request: proper registration/initialization of layers inside a list for custom (Hybrid)Blocks

feevos opened a new issue #10101: gluon feature request: proper registration/initialization of layers inside a list for custom (Hybrid)Blocks
URL: https://github.com/apache/incubator-mxnet/issues/10101
 
 
   Dear all, it would be very useful if one could add NN layers of a gluon custom model inside a list, similar to ```torch.nn.ModuleList```, something like: 
   
   ```Python
   
   class CustomNet(HybridBlock):
   
       def __init__(self,**kwards):
           HybridBlock.__init__(self,**kwards)
           with self.name_scope():
              layers_list = []
              for i in range(5):
                  layers_list += [gluon.nn.Conv2D( SomeArguments )]
   
   
       def hybrid_forward(self,F,_x):
            # Some manipulation of layers_list elements
            out = ... 
    
           return out
   ```
   I can think of many use cases, but one important one is indexing for neuroevolution problems, i.e. using a variable architecture of a specified set of layers. 
   
   Thank you very much for the great work you put into gluon/mxnet. 

----------------------------------------------------------------
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