haojin2 commented on a change in pull request #11229: [MXNET-379] L1 
Normalization
URL: https://github.com/apache/incubator-mxnet/pull/11229#discussion_r194868524
 
 

 ##########
 File path: src/operator/tensor/broadcast_reduce_op.h
 ##########
 @@ -984,13 +986,13 @@ void SqRootForL2(const OpContext& ctx, OpReqType req, 
const TBlob &output) {
 }
 
 template<typename xpu>
-void L2NormCompute(const nnvm::NodeAttrs& attrs,
+void LpNormCompute(const nnvm::NodeAttrs& attrs,
                    const OpContext& ctx,
                    const std::vector<TBlob>& inputs,
                    const std::vector<OpReqType>& req,
                    const std::vector<TBlob>& outputs) {
   const NormParam& param = nnvm::get<NormParam>(attrs.parsed);
-  CHECK_EQ(param.ord, 2) << "norm only support ord=2";
+  CHECK_LE(param.ord, 2) << "norm only supports ord=1 and ord=2";
 
 Review comment:
   I think you should do "CHECK(param.ord == 1 || param.ord == 2)" as any ord 
<= 0 will also pass this check here.

----------------------------------------------------------------
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

Reply via email to