Commit c3b462fc by Tatsuya Nishiyama Committed by Tianqi Chen

Fix GetReduceAces (#1460)

parent fde98f0e
...@@ -48,7 +48,7 @@ inline TShape GetReduceAxes(const uint32_t indim, ...@@ -48,7 +48,7 @@ inline TShape GetReduceAxes(const uint32_t indim,
if (!exclude) return in_axis; if (!exclude) return in_axis;
TShape r_axis(indim - in_axis.ndim()); TShape r_axis(indim - in_axis.ndim());
for (unsigned i = 0, j = 0, k = 0; i < indim; ++i) { for (unsigned i = 0, j = 0, k = 0; i < indim; ++i) {
if (i == in_axis[j]) { if (j < in_axis.ndim() && i == in_axis[j]) {
++j; ++j;
continue; continue;
} }
......
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