Skip to content

Commit

Permalink
Fix GetReduceAces (#1460)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishi-t authored and tqchen committed Jul 20, 2018
1 parent 5c84a98 commit d32b509
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nnvm/src/top/tensor/reduce.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ inline TShape GetReduceAxes(const uint32_t indim,
if (!exclude) return in_axis;
TShape r_axis(indim - in_axis.ndim());
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;
continue;
}
Expand Down

0 comments on commit d32b509

Please sign in to comment.