From c553dbba6edae857c90ed7b01193d93deba6c741 Mon Sep 17 00:00:00 2001 From: Haichen Shen Date: Wed, 29 May 2019 20:23:09 -0700 Subject: [PATCH] fix warning --- src/relay/op/algorithm/topk.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/relay/op/algorithm/topk.cc b/src/relay/op/algorithm/topk.cc index a1b01ca22aca..c88e2c3ea007 100644 --- a/src/relay/op/algorithm/topk.cc +++ b/src/relay/op/algorithm/topk.cc @@ -39,14 +39,14 @@ bool TopKRel(const Array& types, CHECK_EQ(types.size(), 2); const auto* data = types[0].as(); 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 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 {