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 2017/12/15 06:25:09 UTC

[GitHub] safrooze commented on a change in pull request #9083: Nceloss

safrooze commented on a change in pull request #9083: Nceloss
URL: https://github.com/apache/incubator-mxnet/pull/9083#discussion_r157131103
 
 

 ##########
 File path: example/nce-loss/toy_nce.py
 ##########
 @@ -56,16 +60,16 @@ def provide_label(self):
 
 
 class DataIter(mx.io.DataIter):
-    def __init__(self, count, batch_size, vocab_size, num_label, feature_size):
+    def __init__(self, count, batch_size_, vocab_size_, num_label_, feature_size_):
         super(DataIter, self).__init__()
-        self.batch_size = batch_size
+        self.batch_size = batch_size_
 
 Review comment:
   Trailing underscores for name clashes are part of PEP8: https://www.python.org/dev/peps/pep-0008/#function-and-method-arguments
   The reason for the change is that variable names in the function clash with variable names in the outer 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:
users@infra.apache.org


With regards,
Apache Git Services