Migrate to OpenVINO™ API 2.0 to work with dynamic shapes
- Inferred a custom YOLOv5 but received error:
RuntimeError: Check 'std::get<0>(valid)' failed at inference/src/ie_core.cpp:1414:
InferenceEngine::Core::LoadNetwork doesn't support inputs having dynamic shapes. Use ov::Core::compile_model API instead. Dynamic inputs are :{ input:'images,images', shape={?,3,?,?}} - Inferred a custom mobilenetV2 but received error:
RuntimeError: [GENERAL_ERROR] /home/jenkins/agent/workspace/private-ci/ie/build-linux-ubuntu20/b/repos/openvino/inference-engine/src/vpu/common/src/ngraph/transformations/dynamic_to_static_shape.cpp:48 DynamicToStaticShape transformation: got dynamic rank for StatefulPartitionedCall/mobilenetv2_1.00_224/global_average_pooling2d_1/Mean_Squeeze__74 with type Squeeze ver. 0 while only static is supported
- Upgrade to OpenVINO™ 2022.1 which introduces new OpenVINO™ API 2.0.
- Execute model using ov::Core:compile_model.
- Refer to class ov::CompiledModel and Dynamic Shape.