Skip to content

Commit

Permalink
Fixing references to articles
Browse files Browse the repository at this point in the history
  • Loading branch information
sgolebiewski-intel committed Mar 12, 2024
1 parent 2874f23 commit 06ab9c6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

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-workflow/model-preparation>` article.
This guide describes a deprecated conversion method. The guide on the new and recommended method can be found in the :doc:`Model Preparation <../../../../openvino-workflow/model-preparation>` 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 All @@ -32,8 +32,8 @@ Example of converting a PyTorch model directly from memory:
The following types are supported as an input model for ``convert_model()``:

* PyTorch - ``torch.nn.Module``, ``torch.jit.ScriptModule``, ``torch.jit.ScriptFunction``. Refer to the :doc:`Converting a PyTorch Model<[legacy]-supported-model-formats/[legacy]-convert-pytorch>` article for more details.
* TensorFlow / TensorFlow 2 / Keras - ``tf.keras.Model``, ``tf.keras.layers.Layer``, ``tf.compat.v1.Graph``, ``tf.compat.v1.GraphDef``, ``tf.Module``, ``tf.function``, ``tf.compat.v1.session``, ``tf.train.checkpoint``. Refer to the :doc:`Converting a TensorFlow Model<[legacy]-supported-model-formats/[legacy]-convert-tensorflow>` article for more details.
* PyTorch - ``torch.nn.Module``, ``torch.jit.ScriptModule``, ``torch.jit.ScriptFunction``. Refer to the :doc:`Converting a PyTorch Model <[legacy]-supported-model-formats/[legacy]-convert-pytorch>` article for more details.
* TensorFlow / TensorFlow 2 / Keras - ``tf.keras.Model``, ``tf.keras.layers.Layer``, ``tf.compat.v1.Graph``, ``tf.compat.v1.GraphDef``, ``tf.Module``, ``tf.function``, ``tf.compat.v1.session``, ``tf.train.checkpoint``. Refer to the :doc:`Converting a TensorFlow Model <[legacy]-supported-model-formats/[legacy]-convert-tensorflow>` article for more details.

``convert_model()`` accepts all parameters available in the MO command-line tool. Parameters can be specified by Python classes or string analogs, similar to the command-line tool.

Expand Down Expand Up @@ -64,7 +64,7 @@ Example of using a tuple in the ``input`` parameter to cut a model:
ov_model = convert_model(model, input=("input_name", [3], np.float32))
For complex cases, when a value needs to be set in the ``input`` parameter, the ``InputCutInfo`` class can be used. ``InputCutInfo`` accepts four parameters: ``name``, ``shape``, ``type``, and ``value``.
For complex cases, when a value needs to be set in the ``input`` parameter, the ``InputCutInfo`` class can be used. ``InputCutInfo`` accepts four parameters: ``name``, ``shape``, ``type``, and ``value``.

``InputCutInfo("input_name", [3], np.float32, [0.5, 2.1, 3.4])`` is equivalent of ``InputCutInfo(name="input_name", shape=[3], type=np.float32, value=[0.5, 2.1, 3.4])``.

Expand All @@ -85,11 +85,11 @@ Example of using ``InputCutInfo`` to freeze an input with value:
ov_model = convert_model(model, input=InputCutInfo("input_name", [3], np.float32, [0.5, 2.1, 3.4]))
To set parameters for models with multiple inputs, use ``list`` of parameters.
Parameters supporting ``list``:
Parameters supporting ``list``:

* input
* input_shape
* layout
* layout
* source_layout
* dest_layout
* mean_values
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Main transformations are the majority of low precision transformations. Transfor
* :doc:`MultiplyPartialTransformation <step3-main/arithmetic/multiply-partial>`
* :doc:`MVNTransformation <step3-main/normalization/mvn>`
* :doc:`NormalizeL2Transformation <step3-main/normalization/normalize-l2>`
* :doc:`PadTransformation<step3-main/movement/pad>`
* :doc:`PadTransformation <step3-main/movement/pad>`
* :doc:`PReluTransformation <step3-main/activation/prelu>`
* :doc:`ReduceMaxTransformation <step3-main/reduction/reduce-max>`
* :doc:`ReduceMeanTransformation <step3-main/reduction/reduce-mean>`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Alternatively, it can be enabled explicitly via the device notion, for example `
:fragment: compile_model_auto_batch


For more details, see the :doc:`Automatic batching<automatic-batching>`.
For more details, see the :doc:`Automatic batching <automatic-batching>`.

Multi-stream Execution
+++++++++++++++++++++++++++++++++++++++
Expand All @@ -230,7 +230,7 @@ which means that the incoming infer requests can be processed simultaneously.
When multiple inferences of the same model need to be executed in parallel, the multi-stream feature is preferred to multiple instances of the model or application.
The reason for this is that the implementation of streams in the GPU plugin supports weight memory sharing across streams, thus, memory consumption may be lower, compared to the other approaches.

For more details, see the :doc:`optimization guide<../optimize-inference>`.
For more details, see the :doc:`optimization guide <../optimize-inference>`.

Dynamic Shapes
+++++++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -365,9 +365,9 @@ The GPU plugin has the following additional preprocessing options:

With such preprocessing, GPU plugin will expect ``ov::intel_gpu::ocl::ClImage2DTensor`` (or derived) to be passed for each NV12 plane via ``ov::InferRequest::set_tensor()`` or ``ov::InferRequest::set_tensors()`` methods.

For usage examples, refer to the :doc:`RemoteTensor API<gpu-device/remote-tensor-api-gpu-plugin>`.
For usage examples, refer to the :doc:`RemoteTensor API <gpu-device/remote-tensor-api-gpu-plugin>`.

For more details, see the :doc:`preprocessing API<../optimize-inference/optimize-preprocessing>`.
For more details, see the :doc:`preprocessing API <../optimize-inference/optimize-preprocessing>`.

Model Caching
+++++++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -465,7 +465,7 @@ GPU Performance Checklist: Summary

Since OpenVINO relies on the OpenCL kernels for the GPU implementation, many general OpenCL tips apply:

- Prefer ``FP16`` inference precision over ``FP32``, as Model Conversion API can generate both variants, and the ``FP32`` is the default. To learn about optimization options, see :doc:`Optimization Guide<../../model-optimization>`.
- Prefer ``FP16`` inference precision over ``FP32``, as Model Conversion API can generate both variants, and the ``FP32`` is the default. To learn about optimization options, see :doc:`Optimization Guide <../../model-optimization>`.
- Try to group individual infer jobs by using :doc:`automatic batching <automatic-batching>`.
- Consider :doc:`caching <../optimize-inference/optimizing-latency/model-caching-overview>` to minimize model load time.
- If your application performs inference on the CPU alongside the GPU, or otherwise loads the host heavily, make sure that the OpenCL driver threads do not starve. :doc:`CPU configuration options <cpu-device>` can be used to limit the number of inference threads for the CPU plugin.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ There are three methods of turning an OpenVINO model into a stateful one:
are recognized and applied automatically. The drawback is, the tool does not work with all
models.

* :ref:`MakeStateful transformation.<ov_ug_make_stateful>` - enables the user to choose which
* :ref:`MakeStateful transformation <ov_ug_make_stateful>` - enables the user to choose which
pairs of Parameter and Result to replace, as long as the paired operations are of the same
shape and element type.

* :ref:`LowLatency2 transformation.<ov_ug_low_latency>` - automatically detects and replaces
* :ref:`LowLatency2 transformation <ov_ug_low_latency>` - automatically detects and replaces
Parameter and Result pairs connected to hidden and cell state inputs of LSTM/RNN/GRU operations
or Loop/TensorIterator operations.

Expand Down

0 comments on commit 06ab9c6

Please sign in to comment.