diff --git a/include/infer_tensor.h b/include/infer_tensor.h index 3a8b203b3e6..372a898cae1 100644 --- a/include/infer_tensor.h +++ b/include/infer_tensor.h @@ -111,7 +111,7 @@ class InferTensor : public InferTensorBase { public: InferTensor() = default; ~InferTensor() = default; - InferTensor(DataType type, std::vector shape, const void *data, size_t data_len) { + InferTensor(DataType type, const std::vector &shape, const void *data, size_t data_len) { set_data_type(type); set_shape(shape); set_data(data, data_len);