jasonyu1996 commented on a change in pull request #12430: [MXNET-882] Support
for N-d arrays added to diag op.
URL: https://github.com/apache/incubator-mxnet/pull/12430#discussion_r215822339
##########
File path: src/operator/tensor/diag_op-inl.h
##########
@@ -80,11 +112,13 @@ inline bool DiagOpShape(const nnvm::NodeAttrs& attrs,
const TShape& ishape = (*in_attrs)[0];
if (ishape.ndim() == 0) return false;
- if (ishape.ndim() > 2) LOG(FATAL) << "Input must be 1- or 2-d.";
Review comment:
For 1D input tensor, the original behaviour i.e., constructing a 2D matrix
with the input as its diagonal, is still kept.
----------------------------------------------------------------
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