access2rohit 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_r316340072
##########
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:
correct ... it still worked though. Its not right to check in this way. Will
correct 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:
[email protected]
With regards,
Apache Git Services