Commit 3f6423aa by Siju Samuel Committed by Tianqi Chen

[Compilation Warning Fix] in matrix_op.cc (#356)

The below compilation warning issue has been fixed.

src/top/tensor/matrix_op.cc:37:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 0; i < lshape.ndim() - 1; i++) oshape[i] = lshape[i];
                     ^
src/top/tensor/matrix_op.cc:38:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   for (int i = 1; i < rshape.ndim(); i++) oshape[i + lshape.ndim() - 1] = rshap
parent ec37028c
...@@ -34,8 +34,8 @@ inline bool DotShape(const nnvm::NodeAttrs& attrs, ...@@ -34,8 +34,8 @@ inline bool DotShape(const nnvm::NodeAttrs& attrs,
<< "dot shape inconsistent: " << lshape << " X " << rshape; << "dot shape inconsistent: " << lshape << " X " << rshape;
TShape oshape(lshape.ndim() + rshape.ndim() - 1); TShape oshape(lshape.ndim() + rshape.ndim() - 1);
for (int i = 0; i < lshape.ndim() - 1; i++) oshape[i] = lshape[i]; for (size_t i = 0; i < lshape.ndim() - 1; i++) oshape[i] = lshape[i];
for (int i = 1; i < rshape.ndim(); i++) oshape[i + lshape.ndim() - 1] = rshape[i]; for (size_t i = 1; i < rshape.ndim(); i++) oshape[i + lshape.ndim() - 1] = rshape[i];
NNVM_ASSIGN_OUTPUT_SHAPE(attrs, *out_attrs, 0, oshape); NNVM_ASSIGN_OUTPUT_SHAPE(attrs, *out_attrs, 0, oshape);
return true; return true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment