piiswrong commented on a change in pull request #10630: make the slice of 
sequential a sequential
URL: https://github.com/apache/incubator-mxnet/pull/10630#discussion_r183164673
 
 

 ##########
 File path: python/mxnet/gluon/nn/basic_layers.py
 ##########
 @@ -62,7 +62,15 @@ def __repr__(self):
                         modstr=modstr)
 
     def __getitem__(self, key):
-        return list(self._children.values())[key]
+        layers = list(self._children.values())[key]
+        if isinstance(layers, list):
+            with self.name_scope():
 
 Review comment:
   would it better to set prefix directly to be the same as self instead of 
using name_scope?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to