提交 ab541e32 编写于 作者: L liuqi

Fix index compare warning.

上级 df37e07c
......@@ -44,7 +44,7 @@ class OperatorBase {
*operator_def_, name, default_value);
}
inline const Tensor *Input(index_t idx) {
inline const Tensor *Input(unsigned int idx) {
MACE_CHECK(idx < inputs_.size());
return inputs_[idx];
}
......
......@@ -68,9 +68,8 @@ class Tensor {
inline index_t dim_size() const { return shape_.size(); }
inline index_t dim(index_t index) const {
inline index_t dim(unsigned int index) const {
MACE_CHECK(index < shape_.size(), "Exceeding ndim limit");
MACE_CHECK(index >= 0, "Cannot have negative dimension index");
return shape_[index];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册