Skip to content

Commit

Permalink
Merge branch 'master' into tanh_shrink
Browse files Browse the repository at this point in the history
  • Loading branch information
Asthestarsfalll authored Dec 4, 2023
2 parents 6a2e9c4 + 15ff4e6 commit b76254a
Show file tree
Hide file tree
Showing 44 changed files with 374 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ Legacy Conversion API
:maxdepth: 1
:hidden:

openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model
openvino_docs_MO_DG_prepare_model_convert_model_Cutting_Model
openvino_docs_MO_DG_Additional_Optimization_Use_Cases
openvino_docs_MO_DG_FP16_Compression
openvino_docs_MO_DG_Python_API
openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ
Supported_Model_Formats_MO_DG
Setting Input Shapes <openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model>
Cutting Off Parts of a Model <openvino_docs_MO_DG_prepare_model_convert_model_Cutting_Model>
Embedding Preprocessing Computation <openvino_docs_MO_DG_Additional_Optimization_Use_Cases>
Compressing a Model to FP16 <openvino_docs_MO_DG_FP16_Compression>
Convert Models Represented as Python Objects <openvino_docs_MO_DG_Python_API>
Model Optimizer Frequently Asked Questions <openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ>
Supported Model Formats <Supported_Model_Formats_MO_DG>

.. meta::
:description: Model conversion (MO) furthers the transition between training and
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.. {#openvino_docs_MO_DG_Python_API}
Convert Models Represented as Python Objects
============================================
[LEGACY] Convert Models Represented as Python Objects
=============================================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Model Preparation <openvino_docs_model_processing_introduction>` article.

Model conversion API is represented by ``convert_model()`` method in openvino.tools.mo namespace. ``convert_model()`` is compatible with types from openvino.runtime, like PartialShape, Layout, Type, etc.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Cutting_Model}
Cutting Off Parts of a Model
============================
[LEGACY] Cutting Off Parts of a Model
================================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

Sometimes, it is necessary to remove parts of a model when converting it to OpenVINO IR. This chapter describes how to do it, using model conversion API parameters. Model cutting applies mostly to TensorFlow models, which is why TensorFlow will be used in this chapter's examples, but it may be also useful for other frameworks.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
.. {#openvino_docs_MO_DG_Additional_Optimization_Use_Cases}
Embedding Preprocessing Computation
===================================
[LEGACY] Embedding Preprocessing Computation
=====================================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Conversion Parameters <openvino_docs_OV_Converter_UG_Conversion_Options>` article.

Input data for inference can be different from the training dataset and requires
additional preprocessing before inference. To accelerate the whole pipeline including
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
.. {#openvino_docs_MO_DG_FP16_Compression}
Compressing a Model to FP16
===========================
[LEGACY] Compressing a Model to FP16
=============================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Conversion Parameters <openvino_docs_OV_Converter_UG_Conversion_Options>` article.

By default, when IR is saved all relevant floating-point weights are compressed to ``FP16`` data type during model conversion.
It results in creating a "compressed ``FP16`` model", which occupies about half of
the original space in the file system. The compression may introduce a minor drop in accuracy,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. {#openvino_docs_MO_DG_prepare_model_Model_Optimizer_FAQ}
Model Optimizer Frequently Asked Questions
==========================================
[LEGACY] Model Optimizer Frequently Asked Questions
===========================================================


.. important::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Converting_Model}
Setting Input Shapes
====================
[LEGACY] Setting Input Shapes
====================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Setting Input Shapes <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Converting_Model>` article.

With model conversion API you can increase your model's efficiency by providing an additional shape definition, with these two parameters: `input_shape` and `static_shape`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
.. {#Supported_Model_Formats_MO_DG}
Supported Model Formats
=======================
[LEGACY] Supported Model Formats
=====================================

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Supported Model Formats <Supported_Model_Formats>` article.

.. toctree::
:maxdepth: 1
:hidden:

openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow
openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX
openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_PyTorch
openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow_Lite
openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Paddle
openvino_docs_MO_DG_prepare_model_convert_model_tutorials
Converting a TensorFlow Model <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow>
Converting an ONNX Model <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX>
Converting a PyTorch Model <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_PyTorch>
Converting a TensorFlow Lite Model <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow_Lite>
Converting a PaddlePaddle Model <openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Paddle>
Model Conversion Tutorials <openvino_docs_MO_DG_prepare_model_convert_model_tutorials>

.. meta::
:description: Learn about supported model formats and the methods used to convert, read, and compile them in OpenVINO™.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_ONNX}
Converting an ONNX Model
========================

[LEGACY] Converting an ONNX Model
=============================================

.. meta::
:description: Learn how to convert a model from the
ONNX format to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Converting an ONNX Model <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_ONNX>` article.


.. note:: ONNX models are supported via FrontEnd API. You may skip conversion to IR and read models directly by OpenVINO runtime API. Refer to the :doc:`inference example <openvino_docs_OV_UG_Integrate_OV_with_your_application>` for more details. Using ``convert_model`` is still necessary in more complex cases, such as new custom inputs/outputs in model pruning, adding pre-processing, or using Python conversion extensions.

Converting an ONNX Model
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_Paddle}
Converting a PaddlePaddle Model
===============================
[LEGACY] Converting a PaddlePaddle Model
======================================================


.. meta::
:description: Learn how to convert a model from the
PaddlePaddle format to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Converting a PaddlePaddle Model <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_Paddle>` article.


This page provides general instructions on how to convert a model from a PaddlePaddle format to the OpenVINO IR format using Model Optimizer. The instructions are different depending on PaddlePaddle model format.

.. note:: PaddlePaddle models are supported via FrontEnd API. You may skip conversion to IR and read models directly by OpenVINO runtime API. Refer to the :doc:`inference example <openvino_docs_OV_UG_Integrate_OV_with_your_application>` for more details. Using ``convert_model`` is still necessary in more complex cases, such as new custom inputs/outputs in model pruning, adding pre-processing, or using Python conversion extensions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_PyTorch}
Converting a PyTorch Model
==========================
[LEGACY] Converting a PyTorch Model
============================================


.. meta::
:description: Learn how to convert a model from the
PyTorch format to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Converting a PyTorch Model <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_PyTorch>` article.

This page provides instructions on how to convert a model from the PyTorch format to the OpenVINO IR format.

The conversion is a required step to run inference using OpenVINO API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow}
Converting a TensorFlow Model
=============================

[LEGACY] Converting a TensorFlow Model
============================================

.. meta::
:description: Learn how to convert a model from a
TensorFlow format to the OpenVINO Intermediate Representation.

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Converting a TensorFlow Model <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_TensorFlow>` article.


.. note:: TensorFlow models are supported via :doc:`FrontEnd API <openvino_docs_MO_DG_TensorFlow_Frontend>`. You may skip conversion to IR and read models directly by OpenVINO runtime API. Refer to the :doc:`inference example <openvino_docs_OV_UG_Integrate_OV_with_your_application>` for more details. Using ``convert_model`` is still necessary in more complex cases, such as new custom inputs/outputs in model pruning, adding pre-processing, or using Python conversion extensions.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_TensorFlow_Lite}
Converting a TensorFlow Lite Model
==================================
[LEGACY] Converting a TensorFlow Lite Model
=====================================================


.. meta::
:description: Learn how to convert a model from a
TensorFlow Lite format to the OpenVINO Intermediate Representation.

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Converting a TensorFlow Lite Model <openvino_docs_OV_Converter_UG_prepare_model_convert_model_Convert_Model_From_TensorFlow_Lite>` article.

To convert a TensorFlow Lite model, use the ``mo`` script and specify the path to the input ``.tflite`` model file:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. {#openvino_docs_MO_DG_prepare_model_convert_model_tutorials}
Model Conversion Tutorials
==========================
[LEGACY] Model Conversion Tutorials
====================================================


.. toctree::
Expand Down Expand Up @@ -39,6 +39,12 @@ Model Conversion Tutorials
:description: Get to know conversion methods for specific TensorFlow, ONNX, PyTorch, MXNet, and Kaldi models.


.. danger::

The code described in the tutorials has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

This section provides a set of tutorials that demonstrate conversion methods for specific
TensorFlow, ONNX, and PyTorch models. Note that these instructions do not cover all use
cases and may not reflect your particular needs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Converting a TensorFlow Attention OCR Model
OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

This tutorial explains how to convert the Attention OCR (AOCR) model from the `TensorFlow Attention OCR repository <https://github.com/emedvedev/attention-ocr>`__ to the Intermediate Representation (IR).

Extracting a Model from ``aocr`` Library
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Converting a TensorFlow BERT Model
from TensorFlow to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

Pretrained models for BERT (Bidirectional Encoder Representations from Transformers) are
`publicly available <https://github.com/google-research/bert>`__.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Converting a PyTorch BERT-NER Model
:description: Learn how to convert a BERT-NER model
from PyTorch to the OpenVINO Intermediate Representation.

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

The goal of this article is to present a step-by-step guide on how to convert PyTorch BERT-NER model to OpenVINO IR. First, you need to download the model and convert it to ONNX.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Converting a TensorFlow CRNN Model
from TensorFlow to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

This tutorial explains how to convert a CRNN model to OpenVINO™ Intermediate Representation (IR).

There are several public versions of TensorFlow CRNN model implementation available on GitHub. This tutorial explains how to convert the model from
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ Converting a PyTorch Cascade RCNN R-101 Model
model from PyTorch to the OpenVINO Intermediate Representation.


.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

The goal of this article is to present a step-by-step guide on how to convert a PyTorch Cascade RCNN R-101 model to OpenVINO IR. First, you need to download the model and convert it to ONNX.

Downloading and Converting Model to ONNX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ Converting a TensorFlow DeepSpeech Model
:description: Learn how to convert a DeepSpeech model
from TensorFlow to the OpenVINO Intermediate Representation.

.. danger::

The code described here has been **deprecated!** Do not use it to avoid working with a legacy solution. It will be kept for some time to ensure backwards compatibility, but **you should not use** it in contemporary applications.

This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Python tutorials <tutorials>`.

`DeepSpeech project <https://github.com/mozilla/DeepSpeech>`__ provides an engine to train speech-to-text models.

Downloading the Pretrained DeepSpeech Model
Expand Down
Loading

0 comments on commit b76254a

Please sign in to comment.