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/05/24 18:06:04 UTC
[GitHub] [incubator-mxnet] access2rohit commented on a change in pull
request #15059: [MXNET-1410]Adding Large Tensor Support for tensor transpose
access2rohit commented on a change in pull request #15059: [MXNET-1410]Adding Large Tensor Support for tensor transpose
URL: https://github.com/apache/incubator-mxnet/pull/15059#discussion_r287463944
##########
File path: tests/nightly/test_large_array.py
##########
@@ -279,6 +279,19 @@ def test_diag():
assert_almost_equal(r.asnumpy(), np.diag(a_np, k=k))
+def test_transpose():
+ a = nd.arange(0, LARGE_X).reshape(LARGE_X, 1)
+ b = nd.broadcast_to(a, shape=(a.shape[0], SMALL_Y))
+ t = b.T
+ assert t.shape == (SMALL_Y, LARGE_X)
+ assert np.sum(t[:,-1].asnumpy() == LARGE_X) == b.shape[1]
+ t = nd.swapaxes(b, dim1=0, dim2=1)
Review comment:
These are 3 different transpose operations all three are tested
----------------------------------------------------------------
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