[GitHub] [incubator-mxnet] connorgoggins commented on a change in pull request #17675: [Large Tensor] Fix multi_lars op
connorgoggins commented on a change in pull request #17675: [Large Tensor] Fix multi_lars op URL: https://github.com/apache/incubator-mxnet/pull/17675#discussion_r383560463 ## File path: tests/nightly/test_large_array.py ## @@ -455,6 +455,20 @@ def npy_instance_norm(data, gamma, beta, axis, eps=1E-5): assert_almost_equal(out, out_nd.asnumpy(), forward_check_eps, forward_check_eps) +def check_multi_lars(): +lrs = nd.random_normal(shape=(2**32 + 1, 1)) +weights_sum_sq = nd.random_normal(shape=(2**32 + 1, 1)) +grads_sum_sq = nd.random_normal(shape=(2**32 + 1, 1)) +wds = nd.random_normal(shape=(2**32 + 1, 1)) +eta = .1 +eps = .9 + +out = nd.multi_lars(lrs=lrs, weights_sum_sq=weights_sum_sq, grads_sum_sq=grads_sum_sq, +wds=wds, eta=eta, eps=eps) + +assert out.shape[0] == 4294967297 Review comment: Done! 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: us...@infra.apache.org With regards, Apache Git Services
[GitHub] [incubator-mxnet] connorgoggins commented on a change in pull request #17675: [Large Tensor] Fix multi_lars op
connorgoggins commented on a change in pull request #17675: [Large Tensor] Fix multi_lars op URL: https://github.com/apache/incubator-mxnet/pull/17675#discussion_r384696698 ## File path: tests/nightly/test_large_array.py ## @@ -467,6 +468,20 @@ def check_col2im(): assert res.shape[2] == 2 assert res.shape[3] == 2 assert res.shape[4] == 1 + +def check_multi_lars(): +lrs = nd.random_normal(shape=(LARGE_TENSOR_SHAPE + 1, 1)) +weights_sum_sq = nd.random_normal(shape=(LARGE_TENSOR_SHAPE + 1, 1)) +grads_sum_sq = nd.random_normal(shape=(LARGE_TENSOR_SHAPE + 1, 1)) +wds = nd.random_normal(shape=(LARGE_TENSOR_SHAPE + 1, 1)) +eta = .1 +eps = .9 + +out = nd.multi_lars(lrs=lrs, weights_sum_sq=weights_sum_sq, grads_sum_sq=grads_sum_sq, +wds=wds, eta=eta, eps=eps) + Review comment: Great observation - updated w/type check on the first element to trigger evaluation of the output NDArray. 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: us...@infra.apache.org With regards, Apache Git Services