mxnet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-mxnet] wkcn commented on a change in pull request #14314: support long for mx.random.seed
Date Mon, 04 Mar 2019 07:42:31 GMT
wkcn commented on a change in pull request #14314: support long for mx.random.seed
URL: https://github.com/apache/incubator-mxnet/pull/14314#discussion_r261947315
 
 

 ##########
 File path: tests/python/unittest/test_random.py
 ##########
 @@ -717,12 +717,24 @@ def test_random_seed():
     shape = (5, 5)
     seed = rnd.randint(-(1 << 31), (1 << 31))
     mx.random.seed(seed)
-    v1 = mx.nd.random_uniform(shape=shape)
+
+    def _assert_same_mx_arrays(a, b):
+        assert len(a) == len(b)
+        for a_i, b_i in zip(a, b):
+            assert (a_i.asnumpy() == b_i.asnumpy()).all()
+
+    N = 100
+    v1 = [mx.nd.random_uniform(shape=shape) for _ in range(N)]
 
 Review comment:
   Updated. Thank you!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

Mime
View raw message