anirudhacharya commented on a change in pull request #11229: [MXNET-379] L1
Normalization
URL: https://github.com/apache/incubator-mxnet/pull/11229#discussion_r194530768
##########
File path: tests/python/unittest/test_operator.py
##########
@@ -2879,6 +2879,36 @@ def npy_layer_norm(data, gamma, beta, axis=1, eps=1E-5):
grad_nodes={'data': req, 'gamma': req, 'beta':
req},
numeric_eps=1e-2, rtol=1e-2, atol=1e-2)
+@with_seed()
+def test_norml1():
+ def npy_l1norm(data, axis):
+ np.sum(abs(np_arr), axis=i, keepdims=True)
+ ctx = default_context()
+ data = mx.symbol.Variable('data')
+
+ for dtype in [np.float16, np.float32, np.float64]:
+ dtype = np.float32
Review comment:
had put in for debugging something. will remove it and randomize the shape
tuple with ``test_utils.rand_shape_nd``
----------------------------------------------------------------
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