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/08/20 04:25:59 UTC

[GitHub] zheng-da commented on a change in pull request #12209: Make the output format of control flow operators consistent with their UDFs

zheng-da commented on a change in pull request #12209: Make the output format of control flow operators consistent with their UDFs
URL: https://github.com/apache/incubator-mxnet/pull/12209#discussion_r211138428
 
 

 ##########
 File path: python/mxnet/ndarray/contrib.py
 ##########
 @@ -98,6 +98,39 @@ def rand_zipfian(true_classes, num_sampled, range_max, ctx=None):
     return sampled_classes, expected_count_true, expected_count_sampled
 # pylint: enable=line-too-long
 
+
+def _flatten(args, inout_str):
+    if isinstance(args, ndarray.NDArray):
+        return [args], int(0)
+
+    assert isinstance(args, (list, tuple)), \
+        "HybridBlock %s must be (nested) list of Symbol or NDArray, " \
+        "but got %s of type %s"%(inout_str, str(args), str(type(args)))
 
 Review comment:
   it's the same problem.

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