[DOCS] pytorch usage adjustment - model formats 23.1 (#19561)
This commit is contained in:
@@ -22,9 +22,19 @@
|
||||
|
||||
**OpenVINO IR (Intermediate Representation)** - the proprietary and default format of OpenVINO, benefiting from the full extent of its features. All other supported model formats, as listed below, are converted to :doc:`OpenVINO IR <openvino_ir>` to enable inference. Consider storing your model in this format to minimize first-inference latency, perform model optimization, and, in some cases, save space on your drive.
|
||||
|
||||
**PyTorch, TensorFlow, ONNX, and PaddlePaddle** can be used by OpenVINO Runtime API, via the ``read_model()`` and ``compile_model()`` commands, resulting in under-the-hood conversion to OpenVINO IR. To perform additional adjustments to the model you can use the ``convert_model()`` method, which allows you to set shapes, change model input types or layouts, cut parts of the model, freeze inputs etc. A detailed description of ``convert_model()`` capabilities can be found in the :doc:`model conversion guide <openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide>`.
|
||||
**PyTorch, TensorFlow, ONNX, and PaddlePaddle** - can be used with OpenVINO Runtime API directly,
|
||||
which means you do not need to save them as OpenVINO IR before including them in your application.
|
||||
OpenVINO can read, compile, and convert them automatically, as part of its pipeline.
|
||||
|
||||
Here are code examples for each method, for all supported model formats.
|
||||
In the Python API, these options are provided as three separate methods:
|
||||
``read_model()``, ``compile_model()``, and ``convert_model()``.
|
||||
The ``convert_model()`` method enables you to perform additional adjustments
|
||||
to the model, such as setting shapes, changing model input types or layouts,
|
||||
cutting parts of the model, freezing inputs, etc. For a detailed description
|
||||
of the conversion process, see the
|
||||
:doc:`model conversion guide <openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide>`.
|
||||
|
||||
Here are code examples of how to use these methods with different model formats:
|
||||
|
||||
.. tab-set::
|
||||
|
||||
@@ -531,19 +541,21 @@ Here are code examples for each method, for all supported model formats.
|
||||
:doc:`article <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Paddle>`.
|
||||
|
||||
|
||||
**MXNet, Caffe, and Kaldi** are legacy formats that need to be converted explicitly to OpenVINO IR before running inference. The model conversion in some cases may involve intermediate steps. For more details, refer to the :doc:`MXNet <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_MxNet>`, :doc:`Caffe <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Caffe>`, :doc:`Kaldi <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Kaldi>` conversion guides.
|
||||
**MXNet, Caffe, and Kaldi** are legacy formats that need to be converted explicitly to OpenVINO IR or ONNX before running inference.
|
||||
As OpenVINO is currently proceeding **to deprecate these formats** and **remove their support entirely in the future**,
|
||||
converting them to ONNX for use with OpenVINO should be considered the default path.
|
||||
|
||||
OpenVINO is currently proceeding **to deprecate these formats** and **remove their support entirely in the future**. Converting these formats to ONNX or using an LTS version might be a viable solution for inference in OpenVINO Toolkit.
|
||||
|
||||
.. note::
|
||||
|
||||
To convert models, :doc:`install OpenVINO™ Development Tools <openvino_docs_install_guides_install_dev_tools>`,
|
||||
which include model conversion API.
|
||||
If you want to keep working with the legacy formats the old way, refer to a previous
|
||||
`OpenVINO LTS version and its documentation. <https://docs.openvino.ai/2022.3/Supported_Model_Formats.html>.
|
||||
|
||||
OpenVINO versions of 2023 are mostly compatible with the old instructions,
|
||||
through a deprecated MO tool, installed with the deprecated OpenVINO Developer Tools package.
|
||||
|
||||
`OpenVINO 2023.0 <https://docs.openvino.ai/2023.0/Supported_Model_Formats.html> is the last
|
||||
release officially supporting the MO conversion process for the legacy formats.
|
||||
|
||||
|
||||
Refer to the following articles for details on conversion for different formats and models:
|
||||
|
||||
* :doc:`Conversion examples for specific models <openvino_docs_MO_DG_prepare_model_convert_model_tutorials>`
|
||||
* :doc:`Model preparation methods <openvino_docs_model_processing_introduction>`
|
||||
|
||||
@endsphinxdirective
|
||||
@endsphinxdirective
|
||||
Reference in New Issue
Block a user