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/05/18 05:05:53 UTC

[GitHub] [incubator-mxnet] reminisce commented on a change in pull request #14869: Fix infer shape partial after unknown shape changed to -1

reminisce commented on a change in pull request #14869: Fix infer shape partial after unknown shape changed to -1
URL: https://github.com/apache/incubator-mxnet/pull/14869#discussion_r285329483
 
 

 ##########
 File path: src/operator/tensor/dot-inl.h
 ##########
 @@ -1207,6 +1207,14 @@ inline bool DotShape(const nnvm::NodeAttrs& attrs,
   CHECK_EQ(out_attrs->size(), 1U);
   mxnet::TShape& lshape = (*in_attrs)[0];
   mxnet::TShape& rshape = (*in_attrs)[1];
+  // check if lhs ndim is larger than 1 and last dim is known
+  if (lshape.ndim() < 1 || !dim_size_is_known(lshape, lshape.ndim() - 1)) {
+    return false;
+  }
+  // check if rhs ndim is larger than 1 and first dim is known
+  if (rshape.ndim() < 1 || !dim_size_is_known(rshape, 0)) {
 
 Review comment:
   Remove this.

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