Skip to content

Commit

Permalink
fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
icemelon committed Jun 3, 2019
1 parent a444951 commit c553dbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/relay/op/algorithm/topk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ bool TopKRel(const Array<Type>& types,
CHECK_EQ(types.size(), 2);
const auto* data = types[0].as<TensorTypeNode>();
CHECK(data);
size_t ndim = data->shape.size();
int ndim = data->shape.size();
int axis = param->axis;
if (axis < 0) {
axis += ndim;
}
CHECK(axis >= 0 && axis < ndim);
Array<IndexExpr> out_shape;
for (size_t i = 0; i < ndim; ++i) {
for (int i = 0; i < ndim; ++i) {
if (i != axis || param->k < 1) {
out_shape.push_back(data->shape[i]);
} else {
Expand Down

0 comments on commit c553dbb

Please sign in to comment.