anirudhacharya commented on a change in pull request #11229: [MXNET-379] L1
Normalization
URL: https://github.com/apache/incubator-mxnet/pull/11229#discussion_r194531010
##########
File path: tests/python/unittest/test_ndarray.py
##########
@@ -1304,6 +1304,36 @@ def test_norm(ctx=default_context()):
assert arr1.shape == arr2.shape
mx.test_utils.assert_almost_equal(arr1, arr2.asnumpy())
+@with_seed()
+def test_l1norm(ctx=default_context()):
+ np_arr = np.random.uniform(size=(3, 3, 3, 3))
+ mx_arr = mx.nd.array(np_arr, ctx=ctx)
+ arr1 = np.sum(abs(np_arr), keepdims=False)
+ arr2 = mx.nd.norm(mx_arr, ord=1, keepdims=False)
+ print(arr1)
+ print(arr2.asnumpy())
Review comment:
will remove it.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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