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 2019/09/10 22:48:54 UTC

[GitHub] [incubator-mxnet] access2rohit commented on a change in pull request #16136: Reducing memory footprint of one_hot for Large Vector Testing

access2rohit commented on a change in pull request #16136: Reducing memory footprint of one_hot for Large Vector Testing
URL: https://github.com/apache/incubator-mxnet/pull/16136#discussion_r322995113
 
 

 ##########
 File path: tests/nightly/test_large_vector.py
 ##########
 @@ -715,12 +715,13 @@ def test_full():
 
 
 def test_one_hot():
-    a = nd.zeros(10)
-    a[0] = 1
-    a[-1] = 1
+    #default dtype of ndarray is float32 which cannot index elements over 2^32
+    a = nd.array([1], dtype=np.int64)
 
 Review comment:
   `a = nd.array([1, LARGE_X])` would result in b.shape = 2 x 4300000000.
   keeping `a` as single element helps keeps b.shape = 1 x 4300000000.
   @apeforest do you agree ?

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