arcadiaphy commented on a change in pull request #15007: Add matrix determinant operator in linalg URL: https://github.com/apache/incubator-mxnet/pull/15007#discussion_r287310917
########## File path: src/operator/tensor/la_op.h ########## @@ -406,10 +406,72 @@ inline bool InverseShape(const nnvm::NodeAttrs& attrs, CHECK_EQ(in_attrs->size(), 1); CHECK_EQ(out_attrs->size(), 1); const mxnet::TShape& in = (*in_attrs)[0]; + if (!ndim_is_known(in)) return false; const int ndim(in.ndim()); CHECK_GE(ndim, 2) << "Input A's dimension must be >= 2"; CHECK_EQ(in[ndim-2], in[ndim-1]) << "Input A's last two dimension must be equal"; SHAPE_ASSIGN_CHECK(*out_attrs, 0, in); + return shape_is_known(in); +} + +// Type inference function for linalg_inverse +inline bool InverseType(const nnvm::NodeAttrs& attrs, Review comment: It's separate PRs, I'll remove the changes not related to this PR. ---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
