larroy commented on a change in pull request #9784: Fix for the case where 
there are no detections
URL: https://github.com/apache/incubator-mxnet/pull/9784#discussion_r167915405
 
 

 ##########
 File path: example/ssd/detect/detector.py
 ##########
 @@ -43,6 +43,7 @@ class Detector(object):
     ctx : mx.ctx
         device to use, if None, use mx.cpu() as default context
     """
+    CLASS = 0
 
 Review comment:
   this is at class level, is the equivalent of a static variable in C++. A 
variable that is owned by the class itself, instead of the instance. Since it's 
a constant is in caps.  I don't see a problem, other than perhaps the naming. 
So the variable refers to which class the object belongs to. class is a 
reserved identifier in python as you mention, and you indicate that having a 
reserved word just differing by the case might not be good. I don't see a 
problem, in any case we could rename it to KLASS or CLS as is done usually in 
python. Maybe @zhreshold  has additional comments anyway.

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