eric-haibin-lin commented on a change in pull request #9747: Add 
contrib.rand_zipfian
URL: https://github.com/apache/incubator-mxnet/pull/9747#discussion_r169206557
 
 

 ##########
 File path: python/mxnet/ndarray/contrib.py
 ##########
 @@ -18,9 +18,81 @@
 # coding: utf-8
 # pylint: disable=wildcard-import, unused-wildcard-import
 """Contrib NDArray API of MXNet."""
+import math
+from ..context import current_context
+from ..random import uniform
 try:
     from .gen_contrib import *
 except ImportError:
     pass
 
-__all__ = []
+__all__ = ["log_uniform_candidate_sampler"]
+
+# pylint: disable=line-too-long
+def log_uniform_candidate_sampler(true_classes, num_sampled, range_max, 
ctx=None):
 
 Review comment:
   Name changed to rand_zipfian to follow the convention. Extra namespaces such 
as `contrib.random` might over-complicate APIs since there are just a few 
operators in nd.contrib. 

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