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/08/21 18:30:05 UTC

[GitHub] [incubator-mxnet] ChaiBapchya commented on a change in pull request #15943: Added tests to verify Large Vector Support for initial set of ops

ChaiBapchya commented on a change in pull request #15943: Added tests to verify Large Vector Support for initial set of ops 
URL: https://github.com/apache/incubator-mxnet/pull/15943#discussion_r316336382
 
 

 ##########
 File path: tests/nightly/test_large_vector.py
 ##########
 @@ -33,6 +34,293 @@ def test_slice():
     assert res.shape[0] == MEDIUM_X
 
 
+def test_gluon_embedding():
+    m = gluon.nn.Embedding(SMALL_Y, MEDIUM_X)
+    m.initialize()
+    a = nd.zeros((MEDIUM_X, SMALL_Y))
+    b = m(a)
+    assert b.shape == (MEDIUM_X, SMALL_Y, MEDIUM_X)
+    assert b.asnumpy().size == LARGE_SIZE
+
+
+def test_ndarray_zeros():
+    a = nd.zeros(shape=LARGE_X)
+    assert a[-1] == 0
+    assert a.shape == (LARGE_X,)
+    assert a.size == LARGE_X
+
+
+def test_ndarray_ones():
+    a = nd.ones(shape=(LARGE_X))
+    assert a[-1][0] == 1
 
 Review comment:
   this should give an error! It's a vector isn't it

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