diff --git a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp index bb5f785bf92795..4e73dcf1244c9f 100644 --- a/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp +++ b/src/plugins/intel_npu/src/backend/src/zero_infer_request.cpp @@ -227,6 +227,7 @@ void ZeroInferRequest::get_result() { if (isShapeTensorName(name)) { const auto actualTensorName = name.substr(SHAPE_TENSOR_PREFIX.size()); ov::Shape actualDims; + actualDims.reserve(outputTensor->get_size()); for (size_t i = 0; i < outputTensor->get_size(); ++i) { const auto reverseIdx = outputTensor->get_size() - 1 - i;