You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/03/15 18:29:23 UTC

[GitHub] [incubator-mxnet] junrushao1994 commented on a change in pull request #14409: [Numpy] Change semantics of ndim for operators in `src/operator/contrib`

junrushao1994 commented on a change in pull request #14409: [Numpy] Change semantics of ndim for operators in `src/operator/contrib`
URL: https://github.com/apache/incubator-mxnet/pull/14409#discussion_r266101335
 
 

 ##########
 File path: src/operator/contrib/adaptive_avg_pooling-inl.h
 ##########
 @@ -125,10 +125,13 @@ static bool AdaptiveAvgPoolOpInferShape(const nnvm::NodeAttrs& attrs,
   CHECK_EQ(out_shape->size(), 1U) << "Output:[data]";
   const AdaptiveAvgPoolParam& param = nnvm::get<AdaptiveAvgPoolParam>(attrs.parsed);
   mxnet::TShape dshape(in_shape->at(0));
-  if (dshape.ndim() == 0) return false;
-  if (param.output_size.ndim() == 0) {
+  if (mxnet::op::shape_is_none(dshape)) return false;
+  if (mxnet::op::shape_is_none(param.output_size)) {
 
 Review comment:
   Good catch!

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services