diff --git a/src/relay/op/tensor/transform.cc b/src/relay/op/tensor/transform.cc index 9c4138c84c11..969912f4de8b 100644 --- a/src/relay/op/tensor/transform.cc +++ b/src/relay/op/tensor/transform.cc @@ -1673,7 +1673,7 @@ bool SqueezeRel(const Array& types, CHECK_LT(axis_val, original_shape.size()); original_shape.at(axis_val).second = false; } - for (const auto p : original_shape) { + for (const auto& p : original_shape) { if (p.second) { result_shape.push_back(p.first); } else {