haojin2 commented on a change in pull request #11229: [MXNET-379] L1
Normalization
URL: https://github.com/apache/incubator-mxnet/pull/11229#discussion_r199027684
##########
File path: src/operator/tensor/broadcast_reduce_op_value.cc
##########
@@ -284,10 +284,16 @@ array.
Examples::
- x = [[1, 2],
- [3, 4]]
+ x = [[[1,2],
+ [3,4]],
+ [[2,2],
+ [5,6]]]
- norm(x) = [5.47722578]
+ norm(x, ord=2, axis=1) = [[3.1622777 4.472136 ]
+ [5.3851647 6.3245554]]
+
+ norm(x, ord=1, axis=1) = [[4., 6.],
+ [7., 8.]]
rsp = x.cast_storage('row_sparse')
Review comment:
the lines below have examples for sparse, and you should update them with
the latest changes to the behavior of this op, you should also add that only
"ord=2" supports sparse ndarrays after your changes.
----------------------------------------------------------------
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