Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
b2bdc39760
@ -29,6 +29,7 @@ jobs:
|
|||||||
MODELS_PATH: $(REPO_DIR)/../testdata
|
MODELS_PATH: $(REPO_DIR)/../testdata
|
||||||
WORK_DIR: $(Pipeline.Workspace)/_w
|
WORK_DIR: $(Pipeline.Workspace)/_w
|
||||||
BUILD_DIR: $(WORK_DIR)/build
|
BUILD_DIR: $(WORK_DIR)/build
|
||||||
|
BUILD_SAMPLES_DIR: $(WORK_DIR)/build_samples
|
||||||
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
BIN_DIR: $(REPO_DIR)/bin/intel64/$(BUILD_TYPE)
|
||||||
INSTALL_DIR: $(WORK_DIR)/install_pkg
|
INSTALL_DIR: $(WORK_DIR)/install_pkg
|
||||||
SETUPVARS: $(INSTALL_DIR)/bin/setupvars.sh
|
SETUPVARS: $(INSTALL_DIR)/bin/setupvars.sh
|
||||||
@ -56,6 +57,7 @@ jobs:
|
|||||||
- script: |
|
- script: |
|
||||||
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
rm -rf $(WORK_DIR) ; mkdir $(WORK_DIR)
|
||||||
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
rm -rf $(BUILD_DIR) ; mkdir $(BUILD_DIR)
|
||||||
|
rm -rf $(BUILD_SAMPLES_DIR) ; mkdir $(BUILD_SAMPLES_DIR)
|
||||||
echo TargetBranch: $(System.PullRequest.TargetBranch)
|
echo TargetBranch: $(System.PullRequest.TargetBranch)
|
||||||
echo SourceBranch: $(Build.SourceBranch)
|
echo SourceBranch: $(Build.SourceBranch)
|
||||||
displayName: 'Make dir'
|
displayName: 'Make dir'
|
||||||
@ -105,6 +107,8 @@ jobs:
|
|||||||
-DENABLE_PYTHON=ON
|
-DENABLE_PYTHON=ON
|
||||||
-DPYTHON_EXECUTABLE=/usr/bin/python3.6
|
-DPYTHON_EXECUTABLE=/usr/bin/python3.6
|
||||||
-DENABLE_TESTS=ON
|
-DENABLE_TESTS=ON
|
||||||
|
-DNGRAPH_ONNX_IMPORT_ENABLE=ON
|
||||||
|
-DNGRAPH_ONNX_EDITOR_ENABLE=ON
|
||||||
-DENABLE_FASTER_BUILD=ON
|
-DENABLE_FASTER_BUILD=ON
|
||||||
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
|
-DIE_EXTRA_MODULES=$(OPENVINO_CONTRIB_REPO_DIR)/modules
|
||||||
$(REPO_DIR)
|
$(REPO_DIR)
|
||||||
@ -115,12 +119,23 @@ jobs:
|
|||||||
displayName: 'Build Lin'
|
displayName: 'Build Lin'
|
||||||
|
|
||||||
- script: ls -alR $(REPO_DIR)/bin/
|
- script: ls -alR $(REPO_DIR)/bin/
|
||||||
displayName: 'List files'
|
displayName: 'List bin files'
|
||||||
|
|
||||||
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
||||||
workingDirectory: $(BUILD_DIR)
|
workingDirectory: $(BUILD_DIR)
|
||||||
displayName: 'Install'
|
displayName: 'Install'
|
||||||
|
|
||||||
|
- script: ls -alR $(INSTALL_DIR)
|
||||||
|
displayName: 'List install files'
|
||||||
|
|
||||||
|
- script: $(INSTALL_DIR)/deployment_tools/inference_engine/samples/cpp/build_samples.sh
|
||||||
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
||||||
|
displayName: 'Build cpp samples'
|
||||||
|
|
||||||
|
- script: $(INSTALL_DIR)/deployment_tools/inference_engine/samples/c/build_samples.sh
|
||||||
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
||||||
|
displayName: 'Build c samples'
|
||||||
|
|
||||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||||
displayName: 'nGraph UT'
|
displayName: 'nGraph UT'
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
@ -105,7 +105,7 @@ jobs:
|
|||||||
workingDirectory: $(BUILD_DIR)
|
workingDirectory: $(BUILD_DIR)
|
||||||
displayName: 'Install'
|
displayName: 'Install'
|
||||||
|
|
||||||
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru*:IE_CPU.exp_* --gtest_output=xml:TEST-NGraphUT.xml
|
- script: $(BIN_DIR)/unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU*:IE_CPU.onnx_model_sigmoid:IE_CPU/GRUSequenceOp.onnx_model_gru* --gtest_output=xml:TEST-NGraphUT.xml
|
||||||
displayName: 'nGraph UT'
|
displayName: 'nGraph UT'
|
||||||
continueOnError: false
|
continueOnError: false
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@ jobs:
|
|||||||
MODELS_PATH: $(REPO_DIR)\..\testdata
|
MODELS_PATH: $(REPO_DIR)\..\testdata
|
||||||
WORK_DIR: $(Pipeline.Workspace)\_w
|
WORK_DIR: $(Pipeline.Workspace)\_w
|
||||||
BUILD_DIR: D:\build
|
BUILD_DIR: D:\build
|
||||||
|
BUILD_SAMPLES_DIR: D:\build_samples
|
||||||
BIN_DIR: $(REPO_DIR)\bin\intel64
|
BIN_DIR: $(REPO_DIR)\bin\intel64
|
||||||
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
MSVS_VARS_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
|
||||||
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
MSVC_COMPILER_PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.24.28314\bin\Hostx64\x64\cl.exe
|
||||||
@ -56,10 +57,11 @@ jobs:
|
|||||||
- script: |
|
- script: |
|
||||||
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
|
rd /Q /S $(WORK_DIR) & mkdir $(WORK_DIR)
|
||||||
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
rd /Q /S $(BUILD_DIR) & mkdir $(BUILD_DIR)
|
||||||
|
rd /Q /S $(BUILD_SAMPLES_DIR) & mkdir $(BUILD_SAMPLES_DIR)
|
||||||
displayName: 'Make dir'
|
displayName: 'Make dir'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
certutil -urlcache -split -f https://openvinoweb.z5.web.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
||||||
call install_ib_console.bat
|
call install_ib_console.bat
|
||||||
workingDirectory: $(WORK_DIR)
|
workingDirectory: $(WORK_DIR)
|
||||||
displayName: 'Install IncrediBuild'
|
displayName: 'Install IncrediBuild'
|
||||||
@ -101,12 +103,23 @@ jobs:
|
|||||||
displayName: 'Build Win'
|
displayName: 'Build Win'
|
||||||
|
|
||||||
- script: dir $(REPO_DIR)\bin\ /s
|
- script: dir $(REPO_DIR)\bin\ /s
|
||||||
displayName: 'List files'
|
displayName: 'List bin files'
|
||||||
|
|
||||||
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
- script: cmake -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -P cmake_install.cmake
|
||||||
workingDirectory: $(BUILD_DIR)
|
workingDirectory: $(BUILD_DIR)
|
||||||
displayName: 'Install'
|
displayName: 'Install'
|
||||||
|
|
||||||
|
- script: dir $(INSTALL_DIR) /s
|
||||||
|
displayName: 'List install files'
|
||||||
|
|
||||||
|
- script: $(INSTALL_DIR)\deployment_tools\inference_engine\samples\cpp\build_samples_msvc.bat
|
||||||
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
||||||
|
displayName: 'Build cpp samples'
|
||||||
|
|
||||||
|
- script: $(INSTALL_DIR)\deployment_tools\inference_engine\samples\c\build_samples_msvc.bat
|
||||||
|
workingDirectory: $(BUILD_SAMPLES_DIR)
|
||||||
|
displayName: 'Build c samples'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
set PATH=$(TEST_ENV_PATH)
|
set PATH=$(TEST_ENV_PATH)
|
||||||
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
$(BIN_DIR)\unit-test --gtest_print_time=1 --gtest_filter=-backend_api.config_unsupported:*IE_GPU* --gtest_output=xml:TEST-NGraphUT.xml
|
||||||
|
@ -47,7 +47,7 @@ jobs:
|
|||||||
displayName: 'Make dir'
|
displayName: 'Make dir'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
certutil -urlcache -split -f https://incredibuilddiag1wu2.blob.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
certutil -urlcache -split -f https://openvinoweb.z5.web.core.windows.net/incredibuild/install_ib_console.bat install_ib_console.bat
|
||||||
call install_ib_console.bat
|
call install_ib_console.bat
|
||||||
workingDirectory: $(WORK_DIR)
|
workingDirectory: $(WORK_DIR)
|
||||||
displayName: 'Install IncrediBuild'
|
displayName: 'Install IncrediBuild'
|
||||||
|
1
Jenkinsfile
vendored
1
Jenkinsfile
vendored
@ -13,6 +13,7 @@ properties([
|
|||||||
name: 'library_version')
|
name: 'library_version')
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
loadOpenVinoLibrary {
|
loadOpenVinoLibrary {
|
||||||
entrypoint(this)
|
entrypoint(this)
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,6 @@ function(set_temp_directory temp_variable source_tree_dir)
|
|||||||
if (DEFINED ENV{DL_SDK_TEMP} AND NOT $ENV{DL_SDK_TEMP} STREQUAL "")
|
if (DEFINED ENV{DL_SDK_TEMP} AND NOT $ENV{DL_SDK_TEMP} STREQUAL "")
|
||||||
message(STATUS "DL_SDK_TEMP environment is set : $ENV{DL_SDK_TEMP}")
|
message(STATUS "DL_SDK_TEMP environment is set : $ENV{DL_SDK_TEMP}")
|
||||||
file(TO_CMAKE_PATH $ENV{DL_SDK_TEMP} temp)
|
file(TO_CMAKE_PATH $ENV{DL_SDK_TEMP} temp)
|
||||||
if (ENABLE_ALTERNATIVE_TEMP)
|
|
||||||
set(ALTERNATIVE_PATH ${source_tree_dir}/temp)
|
|
||||||
endif()
|
|
||||||
else ()
|
else ()
|
||||||
set(temp ${source_tree_dir}/temp)
|
set(temp ${source_tree_dir}/temp)
|
||||||
endif()
|
endif()
|
||||||
|
@ -175,7 +175,7 @@ function (CheckOrDownloadAndExtract component RELATIVE_URL archive_name unpacked
|
|||||||
#path exists, so we would like to check what was unpacked version
|
#path exists, so we would like to check what was unpacked version
|
||||||
set (version_file ${unpacked_path}/ie_dependency.info)
|
set (version_file ${unpacked_path}/ie_dependency.info)
|
||||||
|
|
||||||
if (NOT EXISTS ${version_file} AND NOT ${ENABLE_ALTERNATIVE_TEMP})
|
if (NOT EXISTS ${version_file})
|
||||||
clean_message(FATAL_ERROR "error: Dependency doesn't contain version file. Please select actions: \n"
|
clean_message(FATAL_ERROR "error: Dependency doesn't contain version file. Please select actions: \n"
|
||||||
"if you are not sure about your FS dependency - remove it : \n"
|
"if you are not sure about your FS dependency - remove it : \n"
|
||||||
"\trm -rf ${unpacked_path}\n"
|
"\trm -rf ${unpacked_path}\n"
|
||||||
|
@ -56,8 +56,6 @@ ie_option (VERBOSE_BUILD "shows extra information about build" OFF)
|
|||||||
|
|
||||||
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
|
ie_option (ENABLE_UNSAFE_LOCATIONS "skip check for MD5 for dependency" OFF)
|
||||||
|
|
||||||
ie_option (ENABLE_ALTERNATIVE_TEMP "in case of dependency conflict, to avoid modification in master, use local copy of dependency" OFF)
|
|
||||||
|
|
||||||
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "CMAKE_CXX_COMPILER_ID MATCHES ^(Apple)?Clang$; NOT WIN32" OFF)
|
ie_dependent_option (ENABLE_FUZZING "instrument build for fuzzing" OFF "CMAKE_CXX_COMPILER_ID MATCHES ^(Apple)?Clang$; NOT WIN32" OFF)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -19,7 +19,3 @@ endmacro()
|
|||||||
|
|
||||||
# need libusb 32-bits version
|
# need libusb 32-bits version
|
||||||
_set_if_not_defined(ENABLE_VPU OFF)
|
_set_if_not_defined(ENABLE_VPU OFF)
|
||||||
|
|
||||||
# fix conversion from uint64_t / int64_t to size_t
|
|
||||||
_set_if_not_defined(NGRAPH_ONNX_IMPORT_ENABLE OFF)
|
|
||||||
_set_if_not_defined(NGRAPH_ONNX_EDITOR_ENABLE OFF)
|
|
||||||
|
@ -9,7 +9,9 @@ After installation of Intel® Distribution of OpenVINO™ toolkit, С, C++ and P
|
|||||||
|
|
||||||
Inference Engine sample applications include the following:
|
Inference Engine sample applications include the following:
|
||||||
|
|
||||||
- **[Automatic Speech Recognition C++ Sample](../../inference-engine/samples/speech_sample/README.md)** – Acoustic model inference based on Kaldi neural networks and speech feature vectors.
|
- **Speech Sample** - Acoustic model inference based on Kaldi neural networks and speech feature vectors.
|
||||||
|
- [Automatic Speech Recognition C++ Sample](../../inference-engine/samples/speech_sample/README.md)
|
||||||
|
- [Automatic Speech Recognition Python Sample](../../inference-engine/ie_bridges/python/sample/speech_sample/README.md)
|
||||||
- **Benchmark Application** – Estimates deep learning inference performance on supported devices for synchronous and asynchronous modes.
|
- **Benchmark Application** – Estimates deep learning inference performance on supported devices for synchronous and asynchronous modes.
|
||||||
- [Benchmark C++ Tool](../../inference-engine/samples/benchmark_app/README.md)
|
- [Benchmark C++ Tool](../../inference-engine/samples/benchmark_app/README.md)
|
||||||
- [Benchmark Python Tool](../../inference-engine/tools/benchmark_tool/README.md)
|
- [Benchmark Python Tool](../../inference-engine/tools/benchmark_tool/README.md)
|
||||||
|
@ -117,6 +117,8 @@ When specifying key values as raw strings (that is, when using Python API), omit
|
|||||||
| `KEY_GPU_THROUGHPUT_STREAMS` | `KEY_GPU_THROUGHPUT_AUTO`, or positive integer| 1 | Specifies a number of GPU "execution" streams for the throughput mode (upper bound for a number of inference requests that can be executed simultaneously).<br>This option is can be used to decrease GPU stall time by providing more effective load from several streams. Increasing the number of streams usually is more effective for smaller topologies or smaller input sizes. Note that your application should provide enough parallel slack (e.g. running many inference requests) to leverage full GPU bandwidth. Additional streams consume several times more GPU memory, so make sure the system has enough memory available to suit parallel stream execution. Multiple streams might also put additional load on CPU. If CPU load increases, it can be regulated by setting an appropriate `KEY_CLDNN_PLUGIN_THROTTLE` option value (see above). If your target system has relatively weak CPU, keep throttling low. <br>The default value is 1, which implies latency-oriented behavior.<br>`KEY_GPU_THROUGHPUT_AUTO` creates bare minimum of streams to improve the performance; this is the most portable option if you are not sure how many resources your target machine has (and what would be the optimal number of streams). <br> A positive integer value creates the requested number of streams. |
|
| `KEY_GPU_THROUGHPUT_STREAMS` | `KEY_GPU_THROUGHPUT_AUTO`, or positive integer| 1 | Specifies a number of GPU "execution" streams for the throughput mode (upper bound for a number of inference requests that can be executed simultaneously).<br>This option is can be used to decrease GPU stall time by providing more effective load from several streams. Increasing the number of streams usually is more effective for smaller topologies or smaller input sizes. Note that your application should provide enough parallel slack (e.g. running many inference requests) to leverage full GPU bandwidth. Additional streams consume several times more GPU memory, so make sure the system has enough memory available to suit parallel stream execution. Multiple streams might also put additional load on CPU. If CPU load increases, it can be regulated by setting an appropriate `KEY_CLDNN_PLUGIN_THROTTLE` option value (see above). If your target system has relatively weak CPU, keep throttling low. <br>The default value is 1, which implies latency-oriented behavior.<br>`KEY_GPU_THROUGHPUT_AUTO` creates bare minimum of streams to improve the performance; this is the most portable option if you are not sure how many resources your target machine has (and what would be the optimal number of streams). <br> A positive integer value creates the requested number of streams. |
|
||||||
| `KEY_EXCLUSIVE_ASYNC_REQUESTS` | `YES` / `NO` | `NO` | Forces async requests (also from different executable networks) to execute serially.|
|
| `KEY_EXCLUSIVE_ASYNC_REQUESTS` | `YES` / `NO` | `NO` | Forces async requests (also from different executable networks) to execute serially.|
|
||||||
| `KEY_CLDNN_MAX_NUM_THREADS` | `integer value` | `maximum # of HW threads available in host environment` | Specifies the number of CPU threads that can be used for clDNN engine, e.g, JIT compilation of clDNN kernels or clDNN cpu kernel processing. The default value is set as the number of maximum available threads in host environment to minimize the time for LoadNetwork, where the clDNN kernel build time occupies a large portion. Note that if the specified value is larger than the maximum available # of threads or less than zero, it is set as maximum available # of threads. It can be specified with a smaller number than the available HW threads according to the usage scenario, e.g., when the user wants to assign more CPU threads while clDNN plugin is running. Note that setting this value with lower number will affect not only the network loading time but also the cpu layers of clDNN networks that are optimized with multi-threading. |
|
| `KEY_CLDNN_MAX_NUM_THREADS` | `integer value` | `maximum # of HW threads available in host environment` | Specifies the number of CPU threads that can be used for clDNN engine, e.g, JIT compilation of clDNN kernels or clDNN cpu kernel processing. The default value is set as the number of maximum available threads in host environment to minimize the time for LoadNetwork, where the clDNN kernel build time occupies a large portion. Note that if the specified value is larger than the maximum available # of threads or less than zero, it is set as maximum available # of threads. It can be specified with a smaller number than the available HW threads according to the usage scenario, e.g., when the user wants to assign more CPU threads while clDNN plugin is running. Note that setting this value with lower number will affect not only the network loading time but also the cpu layers of clDNN networks that are optimized with multi-threading. |
|
||||||
|
| `KEY_CLDNN_ENABLE_LOOP_UNROLLING` | `YES` / `NO` | `YES` | Enables recurrent layers such as TensorIterator or Loop with fixed iteration count to be unrolled. It is turned on by default. Turning this key on will achieve better inference performance for loops with not too many iteration counts (less than 16, as a rule of thumb). Turning this key off will achieve better performance for both graph loading time and inference time with many iteration counts (greater than 16). Note that turning this key on will increase the graph loading time in proportion to the iteration counts. Thus, this key should be turned off if graph loading time is considered to be most important target to optimize. |
|
||||||
|
|
||||||
## Note on Debug Capabilities of the GPU Plugin
|
## Note on Debug Capabilities of the GPU Plugin
|
||||||
|
|
||||||
Inference Engine GPU plugin provides possibility to dump the user custom OpenCL™ kernels to a file to allow you to properly debug compilation issues in your custom kernels.
|
Inference Engine GPU plugin provides possibility to dump the user custom OpenCL™ kernels to a file to allow you to properly debug compilation issues in your custom kernels.
|
||||||
|
@ -85,7 +85,7 @@ Notice that until R2 you had to calculate number of requests in your application
|
|||||||
@snippet snippets/MULTI5.cpp part5
|
@snippet snippets/MULTI5.cpp part5
|
||||||
|
|
||||||
## Using the Multi-Device with OpenVINO Samples and Benchmarking the Performance
|
## Using the Multi-Device with OpenVINO Samples and Benchmarking the Performance
|
||||||
Notice that every OpenVINO sample that supports "-d" (which stays for "device") command-line option transparently accepts the multi-device.
|
Notice that every OpenVINO sample that supports "-d" (which stands for "device") command-line option transparently accepts the multi-device.
|
||||||
The [Benchmark Application](../../../inference-engine/samples/benchmark_app/README.md) is the best reference to the optimal usage of the multi-device. As discussed multiple times earlier, you don't need to setup number of requests, CPU streams or threads as the application provides optimal out of the box performance.
|
The [Benchmark Application](../../../inference-engine/samples/benchmark_app/README.md) is the best reference to the optimal usage of the multi-device. As discussed multiple times earlier, you don't need to setup number of requests, CPU streams or threads as the application provides optimal out of the box performance.
|
||||||
Below is example command-line to evaluate HDDL+GPU performance with that:
|
Below is example command-line to evaluate HDDL+GPU performance with that:
|
||||||
|
|
||||||
|
@ -4,8 +4,8 @@
|
|||||||
- Compile an InferenceEngine::ICNNNetwork instance to a backend specific graph representation
|
- Compile an InferenceEngine::ICNNNetwork instance to a backend specific graph representation
|
||||||
- Create an arbitrary number of `InferRequest` objects
|
- Create an arbitrary number of `InferRequest` objects
|
||||||
- Hold some common resources shared between different instances of `InferRequest`. For example:
|
- Hold some common resources shared between different instances of `InferRequest`. For example:
|
||||||
- InferenceEngine::ExecutableNetworkInternal::_taskExecutor task executor to implement asynchronous execution
|
- InferenceEngine::IExecutableNetworkInternal::_taskExecutor task executor to implement asynchronous execution
|
||||||
- InferenceEngine::ExecutableNetworkInternal::_callbackExecutor task executor to run an asynchronous inference request callback in a separate thread
|
- InferenceEngine::IExecutableNetworkInternal::_callbackExecutor task executor to run an asynchronous inference request callback in a separate thread
|
||||||
|
|
||||||
`ExecutableNetwork` Class
|
`ExecutableNetwork` Class
|
||||||
------------------------
|
------------------------
|
||||||
|
@ -21,7 +21,7 @@ To build an Inference Engine plugin with the Plugin API, see the [Inference Engi
|
|||||||
Plugin Class
|
Plugin Class
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
Inference Engine Plugin API provides the helper InferenceEngine::InferencePluginInternal class recommended to use as a base class for a plugin.
|
Inference Engine Plugin API provides the helper InferenceEngine::IInferencePlugin class recommended to use as a base class for a plugin.
|
||||||
Based on that, declaration of a plugin class can look as follows:
|
Based on that, declaration of a plugin class can look as follows:
|
||||||
|
|
||||||
@snippet src/template_plugin.hpp plugin:header
|
@snippet src/template_plugin.hpp plugin:header
|
||||||
@ -56,8 +56,8 @@ A plugin must define a device name enabled via the `_pluginName` field of a base
|
|||||||
|
|
||||||
### `LoadExeNetworkImpl()`
|
### `LoadExeNetworkImpl()`
|
||||||
|
|
||||||
**Implementation details:** The base InferenceEngine::InferencePluginInternal class provides a common implementation
|
**Implementation details:** The base InferenceEngine::IInferencePlugin class provides a common implementation
|
||||||
of the public InferenceEngine::InferencePluginInternal::LoadNetwork method that calls plugin-specific `LoadExeNetworkImpl`, which is defined in a derived class.
|
of the public InferenceEngine::IInferencePlugin::LoadNetwork method that calls plugin-specific `LoadExeNetworkImpl`, which is defined in a derived class.
|
||||||
|
|
||||||
This is the most important function of the `Plugin` class and creates an instance of compiled `ExecutableNetwork`,
|
This is the most important function of the `Plugin` class and creates an instance of compiled `ExecutableNetwork`,
|
||||||
which holds a backend-dependent compiled graph in an internal representation:
|
which holds a backend-dependent compiled graph in an internal representation:
|
||||||
@ -166,10 +166,10 @@ using an [ExecutableNetwork](@ref executable_network) object. This functionality
|
|||||||
backend specific graph compilation takes significant time and/or cannot be done on a target host
|
backend specific graph compilation takes significant time and/or cannot be done on a target host
|
||||||
device due to other reasons.
|
device due to other reasons.
|
||||||
|
|
||||||
**Implementation details:** The base plugin class InferenceEngine::InferencePluginInternal implements InferenceEngine::InferencePluginInternal::ImportNetwork
|
**Implementation details:** The base plugin class InferenceEngine::IInferencePlugin implements InferenceEngine::IInferencePlugin::ImportNetwork
|
||||||
as follows: exports a device type (InferenceEngine::InferencePluginInternal::_pluginName) and then calls `ImportNetworkImpl`,
|
as follows: exports a device type (InferenceEngine::IInferencePlugin::_pluginName) and then calls `ImportNetworkImpl`,
|
||||||
which is implemented in a derived class.
|
which is implemented in a derived class.
|
||||||
If a plugin cannot use the base implementation InferenceEngine::InferencePluginInternal::ImportNetwork, it can override base
|
If a plugin cannot use the base implementation InferenceEngine::IInferencePlugin::ImportNetwork, it can override base
|
||||||
implementation and define an output blob structure up to its needs. This
|
implementation and define an output blob structure up to its needs. This
|
||||||
can be useful if a plugin exports a blob in a special format for integration with other frameworks
|
can be useful if a plugin exports a blob in a special format for integration with other frameworks
|
||||||
where a common Inference Engine header from a base class implementation is not appropriate.
|
where a common Inference Engine header from a base class implementation is not appropriate.
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
# Convert ONNX* DLRM to the Intermediate Representation {#openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_DLRM}
|
[DEPRECATED] Convert ONNX* DLRM to the Intermediate Representation {#openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_DLRM}
|
||||||
|
===============================
|
||||||
|
|
||||||
> **NOTE**: These instructions are currently deprecated. Since OpenVINO™ 2020.4 version, no specific steps are needed to convert ONNX\* DLRM models. For general instructions on converting ONNX models, please refer to [Converting a ONNX* Model](../Convert_Model_From_ONNX.md) topic.
|
> **NOTE**: These instructions are currently deprecated. Since OpenVINO™ 2020.4 version, no specific steps are needed to convert ONNX\* DLRM models. For general instructions on converting ONNX models, please refer to [Converting a ONNX* Model](../Convert_Model_From_ONNX.md) topic.
|
||||||
|
|
||||||
These instructions are applicable only to the DLRM converted to the ONNX* file format from the [facebookresearch/dlrm model](https://github.com/facebookresearch/dlrm).
|
These instructions are applicable only to the DLRM converted to the ONNX* file format from the [facebookresearch/dlrm model](https://github.com/facebookresearch/dlrm).
|
||||||
|
|
||||||
**Step 1**. Save trained Pytorch* model to ONNX* format. If you train the model using the [script provided in model repository](https://github.com/facebookresearch/dlrm/blob/master/dlrm_s_pytorch.py), just add the `--save-onnx` flag to the command line parameters and you'll get the `dlrm_s_pytorch.onnx` file containing the model serialized in ONNX* format.
|
**Step 1**. Save trained Pytorch* model to ONNX* format or download pretrained ONNX* from
|
||||||
|
[MLCommons/inference/recommendation/dlrm](https://github.com/mlcommons/inference/tree/r1.0/recommendation/dlrm/pytorch#supported-models) repository.
|
||||||
|
If you train the model using the [script provided in model repository](https://github.com/facebookresearch/dlrm/blob/master/dlrm_s_pytorch.py), just add the `--save-onnx` flag to the command line parameters and you'll get the `dlrm_s_pytorch.onnx` file containing the model serialized in ONNX* format.
|
||||||
|
|
||||||
**Step 2**. To generate the Intermediate Representation (IR) of the model, change your current working directory to the Model Optimizer installation directory and run the Model Optimizer with the following parameters:
|
**Step 2**. To generate the Intermediate Representation (IR) of the model, change your current working directory to the Model Optimizer installation directory and run the Model Optimizer with the following parameters:
|
||||||
```sh
|
```sh
|
||||||
|
@ -6,15 +6,23 @@
|
|||||||
|
|
||||||
To download the pre-trained model, refer to the [NeMo Speech Models Catalog](https://ngc.nvidia.com/catalog/models/nvidia:nemospeechmodels).
|
To download the pre-trained model, refer to the [NeMo Speech Models Catalog](https://ngc.nvidia.com/catalog/models/nvidia:nemospeechmodels).
|
||||||
Here are the instructions on how to obtain QuartzNet in ONNX* format.
|
Here are the instructions on how to obtain QuartzNet in ONNX* format.
|
||||||
|
|
||||||
|
1. Install the NeMo toolkit using the [instructions](https://github.com/NVIDIA/NeMo/tree/main#installation).
|
||||||
|
|
||||||
|
2. Run the following code:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
import nemo
|
import nemo
|
||||||
import nemo.collections.asr as nemo_asr
|
import nemo.collections.asr as nemo_asr
|
||||||
|
|
||||||
quartznet = nemo_asr.models.ASRConvCTCModel.from_pretrained(model_info='QuartzNet15x5-En')
|
quartznet = nemo_asr.models.EncDecCTCModel.from_pretrained(model_name="QuartzNet15x5Base-En")
|
||||||
# Export QuartzNet model to ONNX* format
|
# Export QuartzNet model to ONNX* format
|
||||||
|
quartznet.decoder.export('decoder_qn.onnx')
|
||||||
|
quartznet.encoder.export('encoder_qn.onnx')
|
||||||
quartznet.export('qn.onnx')
|
quartznet.export('qn.onnx')
|
||||||
```
|
```
|
||||||
This code produces 3 ONNX* model files: `encoder_qt.onnx`, `decoder_qt.onnx`, `qn.onnx`.
|
|
||||||
|
This code produces 3 ONNX* model files: `encoder_qn.onnx`, `decoder_qn.onnx`, `qn.onnx`.
|
||||||
They are `decoder`, `encoder` and a combined `decoder(encoder(x))` models, respectively.
|
They are `decoder`, `encoder` and a combined `decoder(encoder(x))` models, respectively.
|
||||||
|
|
||||||
## Convert ONNX* QuartzNet model to IR
|
## Convert ONNX* QuartzNet model to IR
|
||||||
|
@ -136,7 +136,9 @@ git clone https://github.com/dbolya/yolact
|
|||||||
git checkout 57b8f2d95e62e2e649b382f516ab41f949b57239
|
git checkout 57b8f2d95e62e2e649b382f516ab41f949b57239
|
||||||
```
|
```
|
||||||
|
|
||||||
**Step 2**. Download a pre-trained model, for example `yolact_base_54_800000.pth`.
|
3. Set up the environment as described in `README.md`.
|
||||||
|
|
||||||
|
**Step 2**. Download a pre-trained model from the list attached in the `Evaluation` section of `README.md` document, for example `yolact_base_54_800000.pth`.
|
||||||
|
|
||||||
**Step 3**. Export the model to ONNX* format.
|
**Step 3**. Export the model to ONNX* format.
|
||||||
|
|
||||||
@ -152,10 +154,11 @@ python3 eval.py \
|
|||||||
--trained_model=/path/to/yolact_base_54_800000.pth \
|
--trained_model=/path/to/yolact_base_54_800000.pth \
|
||||||
--score_threshold=0.3 \
|
--score_threshold=0.3 \
|
||||||
--top_k=10 \
|
--top_k=10 \
|
||||||
--image=/path/to/image.jpg
|
--image=/path/to/image.jpg \
|
||||||
|
--cuda=False
|
||||||
```
|
```
|
||||||
|
|
||||||
3. You should get `yolact.onnx` file.
|
3. The script may fail, but you should get `yolact.onnx` file.
|
||||||
|
|
||||||
**Step 4**. Convert the model to the IR:
|
**Step 4**. Convert the model to the IR:
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Download the Pre-trained Language Model on One Billion Word Benchmark
|
## Download the Pre-trained Language Model on One Billion Word Benchmark
|
||||||
|
|
||||||
TensorFlow* provides [a pre-trained Language Model on One Billion Word Benchmark](https://github.com/tensorflow/models/tree/master/research/lm_1b).
|
TensorFlow* provides [a pre-trained Language Model on One Billion Word Benchmark](https://github.com/tensorflow/models/tree/r2.3.0/research/lm_1b).
|
||||||
|
|
||||||
To download the model for IR conversion, please follow the instruction:
|
To download the model for IR conversion, please follow the instruction:
|
||||||
1. Create new directory to store the model:
|
1. Create new directory to store the model:
|
||||||
|
@ -53,12 +53,12 @@ limitations under the License.
|
|||||||
<tab type="user" title="Convert ONNX* Faster R-CNN Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_Faster_RCNN"/>
|
<tab type="user" title="Convert ONNX* Faster R-CNN Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_Faster_RCNN"/>
|
||||||
<tab type="user" title="Convert ONNX* Mask R-CNN Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_Mask_RCNN"/>
|
<tab type="user" title="Convert ONNX* Mask R-CNN Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_Mask_RCNN"/>
|
||||||
<tab type="user" title="Convert ONNX* GPT-2 Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_GPT2"/>
|
<tab type="user" title="Convert ONNX* GPT-2 Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_GPT2"/>
|
||||||
<tab type="user" title="Convert DLRM ONNX* Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_DLRM"/>
|
<tab type="user" title="[DEPRECATED] Convert DLRM ONNX* Model to the Intermediate Representation" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_onnx_specific_Convert_DLRM"/>
|
||||||
<tab type="usergroup" title="Converting Your PyTorch* Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_PyTorch">
|
<tab type="usergroup" title="Converting Your PyTorch* Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_Convert_Model_From_PyTorch">
|
||||||
<tab type="user" title="Convert PyTorch* QuartzNet Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_QuartzNet"/>
|
<tab type="user" title="Convert PyTorch* QuartzNet Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_QuartzNet"/>
|
||||||
<tab type="user" title="Convert PyTorch* RNN-T Model " url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_RNNT"/>
|
<tab type="user" title="Convert PyTorch* RNN-T Model " url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_RNNT"/>
|
||||||
<tab type="user" title="Convert PyTorch* YOLACT Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_YOLACT"/>
|
<tab type="user" title="Convert PyTorch* YOLACT Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_YOLACT"/>
|
||||||
<tab type="user" title="Convert PyTorch* F3Net Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_F3Net"/>
|
<tab type="user" title="Convert PyTorch* F3Net Model" url="@ref openvino_docs_MO_DG_prepare_model_convert_model_pytorch_specific_Convert_F3Net"/>
|
||||||
</tab>
|
</tab>
|
||||||
</tab>
|
</tab>
|
||||||
<tab type="user" title="Model Optimizations Techniques" url="@ref openvino_docs_MO_DG_prepare_model_Model_Optimization_Techniques"/>
|
<tab type="user" title="Model Optimizations Techniques" url="@ref openvino_docs_MO_DG_prepare_model_Model_Optimization_Techniques"/>
|
||||||
|
@ -180,6 +180,7 @@ limitations under the License.
|
|||||||
<tab type="user" title="Object Detection SSD Python* Sample" url="@ref openvino_inference_engine_ie_bridges_python_sample_object_detection_sample_ssd_README"/>
|
<tab type="user" title="Object Detection SSD Python* Sample" url="@ref openvino_inference_engine_ie_bridges_python_sample_object_detection_sample_ssd_README"/>
|
||||||
<tab type="user" title="Object Detection SSD C Sample" url="@ref openvino_inference_engine_ie_bridges_c_samples_object_detection_sample_ssd_README"/>
|
<tab type="user" title="Object Detection SSD C Sample" url="@ref openvino_inference_engine_ie_bridges_c_samples_object_detection_sample_ssd_README"/>
|
||||||
<tab type="user" title="Automatic Speech Recognition C++ Sample" url="@ref openvino_inference_engine_samples_speech_sample_README"/>
|
<tab type="user" title="Automatic Speech Recognition C++ Sample" url="@ref openvino_inference_engine_samples_speech_sample_README"/>
|
||||||
|
<tab type="user" title="Automatic Speech Recognition Python Sample" url="@ref openvino_inference_engine_ie_bridges_python_sample_speech_sample_README"/>
|
||||||
<tab type="user" title="Style Transfer C++ Sample" url="@ref openvino_inference_engine_samples_style_transfer_sample_README"/>
|
<tab type="user" title="Style Transfer C++ Sample" url="@ref openvino_inference_engine_samples_style_transfer_sample_README"/>
|
||||||
<tab type="user" title="Style Transfer Python* Sample" url="@ref openvino_inference_engine_ie_bridges_python_sample_style_transfer_sample_README"/>
|
<tab type="user" title="Style Transfer Python* Sample" url="@ref openvino_inference_engine_ie_bridges_python_sample_style_transfer_sample_README"/>
|
||||||
<tab type="user" title="Benchmark C++ Tool" url="@ref openvino_inference_engine_samples_benchmark_app_README"/>
|
<tab type="user" title="Benchmark C++ Tool" url="@ref openvino_inference_engine_samples_benchmark_app_README"/>
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:4740f9c1c4215367a6e31af0fb23eb9c5abf594e87aaecc211845d0a8480c211
|
oid sha256:d5cf2212b3634a264722b386899197a7f0fa56fbdad97c017d2733cc0d2694d4
|
||||||
size 105457
|
size 105457
|
||||||
|
3
docs/img/cpu_streams_explained_1.png
Normal file
3
docs/img/cpu_streams_explained_1.png
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a922269751e613b205db65c5109567d17a6c0da15d1e6339ebcb52547c4ec6b7
|
||||||
|
size 93872
|
@ -19,8 +19,13 @@ This guide provides installation steps for Intel® Distribution of OpenVINO™ t
|
|||||||
|
|
||||||
## Install the runtime package using the Anaconda* Package Manager
|
## Install the runtime package using the Anaconda* Package Manager
|
||||||
|
|
||||||
1. Set up the Anaconda* environment.
|
1. Set up the Anaconda* environment:
|
||||||
|
```sh
|
||||||
|
conda create --name py37 python=3.7
|
||||||
|
```
|
||||||
|
```sh
|
||||||
|
conda activate py37
|
||||||
|
```
|
||||||
2. Updated conda to the latest version:
|
2. Updated conda to the latest version:
|
||||||
```sh
|
```sh
|
||||||
conda update --all
|
conda update --all
|
||||||
|
@ -5,7 +5,7 @@ OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applicatio
|
|||||||
Intel® Distribution of OpenVINO™ Toolkit provides the following packages available for installation through the PyPI repository:
|
Intel® Distribution of OpenVINO™ Toolkit provides the following packages available for installation through the PyPI repository:
|
||||||
|
|
||||||
* Runtime package with the Inference Engine inside: [https://pypi.org/project/openvino/](https://pypi.org/project/openvino/).
|
* Runtime package with the Inference Engine inside: [https://pypi.org/project/openvino/](https://pypi.org/project/openvino/).
|
||||||
* Developers package that includes the runtime package as a dependency, Model Optimizer, Accuracy Checker and Post-Training Optimization Tool: [https://pypi.org/project/openvino-dev](https://pypi.org/project/openvino-dev).
|
* Developer package that includes the runtime package as a dependency, Model Optimizer and other developer tools: [https://pypi.org/project/openvino-dev](https://pypi.org/project/openvino-dev).
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
|
@ -4,18 +4,25 @@ Copyright © 2018-2021 Intel Corporation
|
|||||||
“Software Package”) is subject to the terms and conditions of the [software license agreements](https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf) for the Software Package, which may also include notices, disclaimers, or
|
“Software Package”) is subject to the terms and conditions of the [software license agreements](https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf) for the Software Package, which may also include notices, disclaimers, or
|
||||||
license terms for third party or open source software included in or with the Software Package, and your use indicates your acceptance of all such terms. Please refer to the “third-party-programs.txt” or other similarly-named text file included with the Software Package for additional details.
|
license terms for third party or open source software included in or with the Software Package, and your use indicates your acceptance of all such terms. Please refer to the “third-party-programs.txt” or other similarly-named text file included with the Software Package for additional details.
|
||||||
|
|
||||||
|
>Intel is committed to the respect of human rights and avoiding complicity in human rights abuses, a policy reflected in the [Intel Global Human Rights Principles](https://www.intel.com/content/www/us/en/policy/policy-human-rights.html). Accordingly, by accessing the Intel material on this platform you agree that you will not use the material in a product or application that causes or contributes to a violation of an internationally recognized human right.
|
||||||
|
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud.
|
OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud.
|
||||||
|
|
||||||
**The Developer Package Includes the Following Components Installed by Default:**
|
The **developer package** includes the following components installed by default:
|
||||||
|
|
||||||
| Component | Description |
|
| Component | Console Script | Description |
|
||||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|------------------|---------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| [Model Optimizer](https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html) | This tool imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine. <br>Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*. |
|
| [Model Optimizer](https://docs.openvinotoolkit.org/latest/openvino_docs_MO_DG_Deep_Learning_Model_Optimizer_DevGuide.html) | `mo` |**Model Optimizer** imports, converts, and optimizes models that were trained in popular frameworks to a format usable by Intel tools, especially the Inference Engine. <br>Popular frameworks include Caffe\*, TensorFlow\*, MXNet\*, and ONNX\*. |
|
||||||
| Additional Tools | A set of tools to work with your models including [Accuracy Checker utility](https://docs.openvinotoolkit.org/latest/omz_tools_accuracy_checker.html), [Post-Training Optimization Tool](https://docs.openvinotoolkit.org/latest/pot_README.html), [Benchmark Tool](../../inference-engine/samples/benchmark_app/README.md) |
|
| [Benchmark Tool](https://docs.openvinotoolkit.org/latest/openvino_inference_engine_tools_benchmark_tool_README.html)| `benchmark_app` | **Benchmark Application** allows you to estimate deep learning inference performance on supported devices for synchronous and asynchronous modes. |
|
||||||
|
| [Accuracy Checker](https://docs.openvinotoolkit.org/latest/omz_tools_accuracy_checker.html) and <br> [Annotation Converter](https://docs.openvinotoolkit.org/latest/omz_tools_accuracy_checker_annotation_converters.html) | `accuracy_check` <br> `convert_annotation` |**Accuracy Checker** is a deep learning accuracy validation tool that allows you to collect accuracy metrics against popular datasets. The main advantages of the tool are the flexibility of configuration and an impressive set of supported datasets, preprocessing, postprocessing, and metrics. <br> **Annotation Converter** is a utility for offline conversion of datasets to the format suitable for metric evaluation used in Accuracy Checker. |
|
||||||
|
| [Post-Training Optimization Tool](https://docs.openvinotoolkit.org/latest/pot_README.html)| `pot` |**Post-Training Optimization Tool** allows you to optimize trained models with advanced capabilities, such as quantization and low-precision optimizations, without the need to retrain or fine-tune models. Optimizations are also available through the [API](https://docs.openvinotoolkit.org/latest/pot_compression_api_README.html). |
|
||||||
|
| [Model Downloader and other Open Model Zoo tools](https://docs.openvinotoolkit.org/latest/omz_tools_downloader.html)| `omz_downloader` <br> `omz_converter` <br> `omz_quantizer` <br> `omz_info_dumper`| **Model Downloader** is a tool for getting access to the collection of high-quality and extremely fast pre-trained deep learning [public](https://docs.openvinotoolkit.org/latest/omz_models_group_public.html) and [intel](https://docs.openvinotoolkit.org/latest/omz_models_group_intel.html)-trained models. Use these free pre-trained models instead of training your own models to speed up the development and production deployment process. The principle of the tool is as follows: it downloads model files from online sources and, if necessary, patches them with Model Optimizer to make them more usable. A number of additional tools are also provided to automate the process of working with downloaded models:<br> **Model Converter** is a tool for converting the models stored in a format other than the Intermediate Representation (IR) into that format using Model Optimizer. <br> **Model Quantizer** is a tool for automatic quantization of full-precision IR models into low-precision versions using Post-Training Optimization Tool. <br> **Model Information Dumper** is a helper utility for dumping information about the models in a stable machine-readable format.|
|
||||||
|
|
||||||
**The Runtime Package Includes the Following Components Installed by Dependency:**
|
|
||||||
|
**Developer package** also provides the **runtime package** installed as a dependency. The runtime package includes the following components:
|
||||||
|
|
||||||
| Component | Description |
|
| Component | Description |
|
||||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
@ -78,35 +85,53 @@ python -m pip install --upgrade pip
|
|||||||
|
|
||||||
### Step 4. Install the Package
|
### Step 4. Install the Package
|
||||||
|
|
||||||
Run the command below: <br>
|
To install and configure the components of the development package for working with specific frameworks, use the `pip install openvino-dev[extras]` command, where `extras` is a list of extras from the table below:
|
||||||
|
|
||||||
|
| DL Framework | Extra |
|
||||||
|
| :------------------------------------------------------------------------------- | :-------------------------------|
|
||||||
|
| [Caffe*](https://caffe.berkeleyvision.org/) | caffe |
|
||||||
|
| [Caffe2*](https://caffe2.ai/) | caffe2 |
|
||||||
|
| [Kaldi*](https://kaldi-asr.org/) | kaldi |
|
||||||
|
| [MXNet*](https://mxnet.apache.org/) | mxnet |
|
||||||
|
| [ONNX*](https://github.com/microsoft/onnxruntime/) | onnx |
|
||||||
|
| [PyTorch*](https://pytorch.org/) | pytorch |
|
||||||
|
| [TensorFlow* 1.x](https://www.tensorflow.org/versions#tensorflow_1) | tensorflow |
|
||||||
|
| [TensorFlow* 2.x](https://www.tensorflow.org/versions#tensorflow_2) | tensorflow2 |
|
||||||
|
|
||||||
|
For example, to install and configure the components for working with TensorFlow 2.x, MXNet and Caffe, use the following command:
|
||||||
```sh
|
```sh
|
||||||
pip install openvino-dev
|
pip install openvino-dev[tensorflow2,mxnet,caffe]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5. Verify that the Package is Installed
|
### Step 5. Verify that the Package Is Installed
|
||||||
|
|
||||||
Run the command below (this may take a few seconds):
|
- To verify that the **developer package** is properly installed, run the command below (this may take a few seconds):
|
||||||
```sh
|
```sh
|
||||||
pot -h
|
mo -h
|
||||||
```
|
```
|
||||||
|
You will see the help message for Model Optimizer if installation finished successfully.
|
||||||
|
|
||||||
You will see the help message for Post-Training Optimization Tool if installation finished successfully.
|
- To verify that Inference Engine from the **runtime package** is available, run the command below:
|
||||||
|
```sh
|
||||||
|
python -c "from openvino.inference_engine import IECore"
|
||||||
|
```
|
||||||
|
You will not see any error messages if installation finished successfully.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
#### Error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
|
### Error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
|
||||||
|
|
||||||
On Windows* some dependencies may require compilation from source when installing. To resolve this issue, you need to install [Build Tools for Visual Studio* 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) and repeat package installation.
|
On Windows* some dependencies may require compilation from source when installing. To resolve this issue, you need to install [Build Tools for Visual Studio* 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) and repeat package installation.
|
||||||
|
|
||||||
#### ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
|
### ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
|
||||||
|
|
||||||
To resolve missing external dependency on Ubuntu*, execute the following command:
|
To resolve missing external dependency on Ubuntu* 18.04, execute the following command:
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install libpython3.7
|
sudo apt-get install libpython3.7
|
||||||
```
|
```
|
||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
- Intel® Distribution of OpenVINO™ toolkit home page: [https://software.intel.com/en-us/openvino-toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
- [Intel® Distribution of OpenVINO™ toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||||
- OpenVINO™ toolkit online documentation: [https://docs.openvinotoolkit.org](https://docs.openvinotoolkit.org)
|
- [OpenVINO™ toolkit online documentation](https://docs.openvinotoolkit.org)
|
||||||
|
- [OpenVINO™ Notebooks](https://github.com/openvinotoolkit/openvino_notebooks)
|
||||||
|
@ -4,6 +4,8 @@ Copyright © 2018-2021 Intel Corporation
|
|||||||
“Software Package”) is subject to the terms and conditions of the [software license agreements](https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf) for the Software Package, which may also include notices, disclaimers, or
|
“Software Package”) is subject to the terms and conditions of the [software license agreements](https://software.intel.com/content/dam/develop/external/us/en/documents/intel-openvino-license-agreements.pdf) for the Software Package, which may also include notices, disclaimers, or
|
||||||
license terms for third party or open source software included in or with the Software Package, and your use indicates your acceptance of all such terms. Please refer to the “third-party-programs.txt” or other similarly-named text file included with the Software Package for additional details.
|
license terms for third party or open source software included in or with the Software Package, and your use indicates your acceptance of all such terms. Please refer to the “third-party-programs.txt” or other similarly-named text file included with the Software Package for additional details.
|
||||||
|
|
||||||
|
>Intel is committed to the respect of human rights and avoiding complicity in human rights abuses, a policy reflected in the [Intel Global Human Rights Principles](https://www.intel.com/content/www/us/en/policy/policy-human-rights.html). Accordingly, by accessing the Intel material on this platform you agree that you will not use the material in a product or application that causes or contributes to a violation of an internationally recognized human right.
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud.
|
OpenVINO™ toolkit is a comprehensive toolkit for quickly developing applications and solutions that solve a variety of tasks including emulation of human vision, automatic speech recognition, natural language processing, recommendation systems, and many others. Based on latest generations of artificial neural networks, including Convolutional Neural Networks (CNNs), recurrent and attention-based networks, the toolkit extends computer vision and non-vision workloads across Intel® hardware, maximizing performance. It accelerates applications with high-performance, AI and deep learning inference deployed from edge to cloud.
|
||||||
@ -13,7 +15,7 @@ The Intel® Distribution of OpenVINO™ toolkit\*:
|
|||||||
- Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® Neural Compute Stick 2, and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
- Supports heterogeneous execution across Intel® CPU, Intel® Integrated Graphics, Intel® Neural Compute Stick 2, and Intel® Vision Accelerator Design with Intel® Movidius™ VPUs
|
||||||
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
|
- Speeds time-to-market via an easy-to-use library of computer vision functions and pre-optimized kernels
|
||||||
|
|
||||||
**The Runtime Package Includes the Following Components Installed by Default:**
|
The **runtime package** includes the following components installed by default:
|
||||||
|
|
||||||
| Component | Description |
|
| Component | Description |
|
||||||
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|-----------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
@ -77,7 +79,7 @@ Run the command below: <br>
|
|||||||
pip install openvino
|
pip install openvino
|
||||||
```
|
```
|
||||||
|
|
||||||
### Step 5. Verify that the Package is Installed
|
### Step 5. Verify that the Package Is Installed
|
||||||
|
|
||||||
Run the command below:
|
Run the command below:
|
||||||
```sh
|
```sh
|
||||||
@ -88,11 +90,11 @@ You will not see any error messages if installation finished successfully.
|
|||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
#### Error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
|
### Error: Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio"
|
||||||
|
|
||||||
On Windows* some dependencies may require compilation from source when installing. To resolve this issue, you need to install [Build Tools for Visual Studio* 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) and repeat package installation.
|
On Windows* some dependencies may require compilation from source when installing. To resolve this issue, you need to install [Build Tools for Visual Studio* 2019](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019) and repeat package installation.
|
||||||
|
|
||||||
#### ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
|
### ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
|
||||||
|
|
||||||
To resolve missing external dependency on Ubuntu*, execute the following command:
|
To resolve missing external dependency on Ubuntu*, execute the following command:
|
||||||
```sh
|
```sh
|
||||||
@ -101,6 +103,7 @@ sudo apt-get install libpython3.7
|
|||||||
|
|
||||||
## Additional Resources
|
## Additional Resources
|
||||||
|
|
||||||
- [Intel® Distribution of OpenVINO™ toolkit](https://software.intel.com/en-us/openvino-toolkit).
|
- [Intel® Distribution of OpenVINO™ toolkit](https://software.intel.com/en-us/openvino-toolkit)
|
||||||
- [OpenVINO™ toolkit online documentation](https://docs.openvinotoolkit.org).
|
- [OpenVINO™ toolkit online documentation](https://docs.openvinotoolkit.org)
|
||||||
|
- [OpenVINO™ Notebooks](https://github.com/openvinotoolkit/openvino_notebooks)
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ PReLU(x) = \left\{\begin{array}{r}
|
|||||||
\end{array}\right.
|
\end{array}\right.
|
||||||
\f]
|
\f]
|
||||||
|
|
||||||
where α is a learnable parameter and corresponds to the negative slope, per channel, defined by the second input `slope`.
|
where α is a learnable parameter and corresponds to the negative slope, defined by the second input `slope`.
|
||||||
|
|
||||||
Another mathematical representation that may be found in other references:
|
Another mathematical representation that may be found in other references:
|
||||||
|
|
||||||
@ -32,13 +32,13 @@ PReLU(x) = \max(0, x) + \alpha\cdot\min(0, x)
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data`. A tensor of type `T` and arbitrary shape. **Required**.
|
* **1**: `data`. A tensor of type *T* and arbitrary shape. **Required**.
|
||||||
* **2**: `slope`. 1D tensor of type `T`. Tensor with negative slope values, one per channel dimension of `data` input tensor. **Required**.
|
* **2**: `slope`. A tensor of type *T* and rank greater or equal to 1. Tensor with negative slope values. **Required**.
|
||||||
* **Note**: Channels dimension corresponds to second dimension of `data` input tensor. If `data` rank is less than 2, the number of channels is 1.
|
* **Note**: Channels dimension corresponds to the second dimension of `data` input tensor. If `slope` input rank is 1 and its dimension is equal to the second dimension of `data` input, then per channel broadcast is applied. Otherwise `slope` input is broadcasted with numpy rules, description is available in [Broadcast Rules For Elementwise Operations](../broadcast_rules.md).
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: The result of element-wise *PReLU* operation applied to `data` input tensor with negative slope values from `slope` input tensor. A tensor of type `T` and the same shape as `data` input tensor.
|
* **1**: The result of element-wise *PReLU* operation applied to `data` input tensor with negative slope values from `slope` input tensor. A tensor of type *T* and the same shape as `data` input tensor.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ The output tensor has shape `[rank(input), num_non_zero]`. For example, for the
|
|||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T*: any numeric type.
|
* *T*: any type.
|
||||||
|
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: `int64` or `int32`.
|
||||||
|
|
||||||
|
@ -89,18 +89,24 @@
|
|||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor with data for interpolation. Type of elements is any supported floating point type or `int8` type. Required.
|
* **1**: `data` - tensor of type `T` with data for interpolation. **Required.**
|
||||||
|
|
||||||
* **2**: `sizes` - 1D tensor describing output shape for spatial axes. Number of elements matches the number of indices in `axes` input, the order matches as well. Required.
|
* **2**: `sizes` - 1D tensor of type `T_SIZE` describing output shape for spatial axes. Number of elements matches the number of indices in `axes` input, the order matches as well. **Required.**
|
||||||
|
|
||||||
* **3**: `scales` - 1D tensor describing scales for spatial axes. Type of elements is any supported floating point type. Number and order of elements match the number and order of indices in `axes` input. Required.
|
* **3**: `scales` - 1D tensor of type `T_SCALES` describing scales for spatial axes. Number and order of elements match the number and order of indices in `axes` input. **Required.**
|
||||||
|
|
||||||
* **4**: `axes` - 1D tensor specifying dimension indices where interpolation is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, e.g. `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`. These indices should be non-negative integers from `0` to `rank(data) - 1` inclusively. Other dimensions do not change. The order of elements in `axes` attribute matters, and mapped directly to elements in the 2nd input `sizes`. Optional with default value `[0,...,rank(data) - 1]`.
|
* **4**: `axes` - 1D tensor of type `T_AXES` specifying dimension indices where interpolation is applied, and `axes` is any unordered list of indices of different dimensions of input tensor, e.g. `[0, 4]`, `[4, 0]`, `[4, 2, 1]`, `[1, 2, 3]`. These indices should be non-negative integers from `0` to `rank(data) - 1` inclusively. Other dimensions do not change. The order of elements in `axes` attribute matters, and mapped directly to elements in the 2nd input `sizes`. **Optional** with default value `[0,...,rank(data) - 1]`.
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Resulting interpolated tensor with elements of the same type as input `data` tensor. The shape of the output matches input `data` shape except spatial dimensions mentioned in `axes` attribute. For other dimensions shape matches sizes from `sizes` in order specified in `axes`.
|
* **1**: Resulting interpolated tensor with elements of the same type as input `data` tensor. The shape of the output matches input `data` shape except spatial dimensions mentioned in `axes` attribute. For other dimensions shape matches sizes from `sizes` in order specified in `axes`.
|
||||||
|
|
||||||
|
**Types**
|
||||||
|
* *T*: any supported numeric type.
|
||||||
|
* *T_SIZE*: any supported integer type.
|
||||||
|
* *T_SCALES*: any supported floating point type.
|
||||||
|
* *T_AXES*: any supported integer type.
|
||||||
|
|
||||||
|
|
||||||
**Detailed description**
|
**Detailed description**
|
||||||
Calculations are performed according to the following rules.
|
Calculations are performed according to the following rules.
|
||||||
|
@ -6,50 +6,6 @@
|
|||||||
|
|
||||||
**Short description**: Local response normalization.
|
**Short description**: Local response normalization.
|
||||||
|
|
||||||
**Attributes**:
|
|
||||||
|
|
||||||
* *alpha*
|
|
||||||
|
|
||||||
* **Description**: *alpha* represents the scaling attribute for the normalizing sum. For example, *alpha* equal 0.0001 means that the normalizing sum is multiplied by 0.0001.
|
|
||||||
* **Range of values**: no restrictions
|
|
||||||
* **Type**: float
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *yes*
|
|
||||||
|
|
||||||
* *beta*
|
|
||||||
|
|
||||||
* **Description**: *beta* represents the exponent for the normalizing sum. For example, *beta* equal 0.75 means that the normalizing sum is raised to the power of 0.75.
|
|
||||||
* **Range of values**: positive number
|
|
||||||
* **Type**: float
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *yes*
|
|
||||||
|
|
||||||
* *bias*
|
|
||||||
|
|
||||||
* **Description**: *bias* represents the offset. Usually positive number to avoid dividing by zero.
|
|
||||||
* **Range of values**: no restrictions
|
|
||||||
* **Type**: float
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *yes*
|
|
||||||
|
|
||||||
* *size*
|
|
||||||
|
|
||||||
* **Description**: *size* represents the side length of the region to be used for the normalization sum. The region can have one or more dimensions depending on the second input axes indices.
|
|
||||||
* **Range of values**: positive integer
|
|
||||||
* **Type**: int
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *yes*
|
|
||||||
|
|
||||||
**Inputs**
|
|
||||||
|
|
||||||
* **1**: `data` - input tensor of any floating point type and arbitrary shape. Required.
|
|
||||||
|
|
||||||
* **2**: `axes` - specifies indices of dimensions in `data` that define normalization slices. Required.
|
|
||||||
|
|
||||||
**Outputs**
|
|
||||||
|
|
||||||
* **1**: Output tensor of the same shape and type as the `data` input tensor.
|
|
||||||
|
|
||||||
**Detailed description**:
|
**Detailed description**:
|
||||||
Local Response Normalization performs a normalization over local input regions.
|
Local Response Normalization performs a normalization over local input regions.
|
||||||
Each input value is divided by
|
Each input value is divided by
|
||||||
@ -71,6 +27,54 @@ sqr_sum[a, b, c, d] =
|
|||||||
output = data / (bias + (alpha / size ** len(axes)) * sqr_sum) ** beta
|
output = data / (bias + (alpha / size ** len(axes)) * sqr_sum) ** beta
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Attributes**:
|
||||||
|
|
||||||
|
* *alpha*
|
||||||
|
|
||||||
|
* **Description**: *alpha* represents the scaling attribute for the normalizing sum. For example, *alpha* equal `0.0001` means that the normalizing sum is multiplied by `0.0001`.
|
||||||
|
* **Range of values**: no restrictions
|
||||||
|
* **Type**: `float`
|
||||||
|
* **Default value**: None
|
||||||
|
* **Required**: *yes*
|
||||||
|
|
||||||
|
* *beta*
|
||||||
|
|
||||||
|
* **Description**: *beta* represents the exponent for the normalizing sum. For example, *beta* equal `0.75` means that the normalizing sum is raised to the power of `0.75`.
|
||||||
|
* **Range of values**: positive number
|
||||||
|
* **Type**: `float`
|
||||||
|
* **Default value**: None
|
||||||
|
* **Required**: *yes*
|
||||||
|
|
||||||
|
* *bias*
|
||||||
|
|
||||||
|
* **Description**: *bias* represents the offset. Usually positive number to avoid dividing by zero.
|
||||||
|
* **Range of values**: no restrictions
|
||||||
|
* **Type**: `float`
|
||||||
|
* **Default value**: None
|
||||||
|
* **Required**: *yes*
|
||||||
|
|
||||||
|
* *size*
|
||||||
|
|
||||||
|
* **Description**: *size* represents the side length of the region to be used for the normalization sum. The region can have one or more dimensions depending on the second input axes indices.
|
||||||
|
* **Range of values**: positive integer
|
||||||
|
* **Type**: `int`
|
||||||
|
* **Default value**: None
|
||||||
|
* **Required**: *yes*
|
||||||
|
|
||||||
|
**Inputs**
|
||||||
|
|
||||||
|
* **1**: `data` - tensor of type `T` and arbitrary shape. **Required.**
|
||||||
|
|
||||||
|
* **2**: `axes` - 1D tensor of type `T_IND` which specifies indices of dimensions in `data` which define normalization slices. **Required.**
|
||||||
|
|
||||||
|
**Outputs**
|
||||||
|
|
||||||
|
* **1**: Output tensor of type `T` and the same shape as the `data` input tensor.
|
||||||
|
|
||||||
|
**Types**
|
||||||
|
* *T*: any supported floating point type.
|
||||||
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
|
@ -4,47 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceL1* operation performs reduction with finding the L1 norm (sum of absolute values) of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceL1* operation performs the reduction with finding the L1 norm (sum of absolute values) on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceL1* operation performs the reduction with finding the L1 norm (sum of absolute values) on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
`output[i0, i1, ..., iN] = L1[j0, ..., jN](x[j0, ..., jN]))`
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and finding the L1 norm `L1[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceL1* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r - 1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceL1* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T2*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with finding a Lp norm operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
`output[i0, i1, ..., iN] = L1[j0,..., jN](x[j0, ..., jN]))`
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the Lp norm `L1[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction scalar value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceL1" ...>
|
<layer id="1" type="ReduceL1" ...>
|
||||||
|
@ -4,47 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceL2* operation performs reduction with finding the L2 norm (square root of sum of squares) of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceL2* operation performs the reduction with finding the L2 norm (square root of sum of squares) on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceL2* operation performs the reduction with finding the L2 norm (square root of sum of squares) on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
`output[i0, i1, ..., iN] = L2[j0, ..., jN](x[j0, ..., jN]))`
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and finding the L2 norm `L2[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceL2* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r - 1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceL2* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: floating point type.
|
* *T*: any supported numeric type.
|
||||||
* *T2*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with finding a Lp norm operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
`output[i0, i1, ..., iN] = L2[j0,..., jN](x[j0, ..., jN]))`
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the Lp norm `L2[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction scalar value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceL2" ...>
|
<layer id="1" type="ReduceL2" ...>
|
||||||
|
@ -4,46 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceLogicalAnd* operation performs reduction with *logical and* operation of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceLogicalAnd* operation performs the reduction with *logical and* operation on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceLogicalAnd* operation performs the reduction with *logical and* operation on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = and[j0,c..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and *logical and* operation `and[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceLogicalAnd* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T_BOOL* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceLogicalAnd* function applied to `data` input tensor. A tensor of type *T_BOOL* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T_BOOL*: `boolean`.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with *logical and* operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = and[j0,..., jN](x[j0, ..., jN]))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and *logical and* operation `and[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceLogicalAnd" ...>
|
<layer id="1" type="ReduceLogicalAnd" ...>
|
||||||
|
@ -4,46 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceLogicalOr* operation performs reduction with *logical or* operation of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceLogicalOr* operation performs the reduction with *logical or* operation on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceLogicalOr* operation performs the reduction with *logical or* operation on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = or[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and *logical or* operation `or[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceLogicalOr* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T_BOOL* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceLogicalOr* function applied to `data` input tensor. A tensor of type *T_BOOL* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T_BOOL*: `boolean`.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with *logical or* operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = or[j0,..., jN](x[j0, ..., jN]**2))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and *logical or* operation `or[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceLogicalOr" ...>
|
<layer id="1" type="ReduceLogicalOr" ...>
|
||||||
|
@ -4,46 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceMax* operation performs reduction with finding the maximum value of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceMax* operation performs the reduction with finding the maximum value on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceMax* operation performs the reduction with finding the maximum value on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = max[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and finding the maximum value `max[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceMax* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceMax* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
** Types **
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with finding a maximum operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = max[j0,..., jN](x[j0, ..., jN]))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the maximum value `max[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceMax" ...>
|
<layer id="1" type="ReduceMax" ...>
|
||||||
|
@ -4,45 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceMean* operation performs reduction with finding the arithmetic mean of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceMean* operation performs the reduction with finding the arithmetic mean on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceMean* operation performs the reduction with finding the arithmetic mean on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = mean[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and finding the arithmetic mean `mean[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceMean* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceMean* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of arithmetic mean reduction operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = mean[j0,..., jN](x[j0, ..., jN]))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the arithmetic mean `mean[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation. Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceMean" ...>
|
<layer id="1" type="ReduceMean" ...>
|
||||||
|
@ -4,46 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceMin* operation performs reduction with finding the minimum value of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceMin* operation performs the reduction with finding the minimum value on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceMin* operation performs the reduction with finding the minimum value on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = min[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and finding the minimum value `min[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceMin* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceMin* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with finding a minimum operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = min[j0,..., jN](x[j0, ..., jN]))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and finding the minimum value `min[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceMin" ...>
|
<layer id="1" type="ReduceMin" ...>
|
||||||
|
@ -4,46 +4,48 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceProd* operation performs reduction with multiplication of the 1st input tensor in slices specified by the 2nd input.
|
**Short description**: *ReduceProd* operation performs the reduction with multiplication on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
|
**Detailed Description**
|
||||||
|
|
||||||
|
*ReduceProd* operation performs the reduction with multiplication on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
|
output[i0, i1, ..., iN] = prod[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
|
where indices i0, ..., iN run through all valid indices for input `data`, and multiplication `prod[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
|
Particular cases:
|
||||||
|
|
||||||
|
1. If `axes` is an empty list, *ReduceProd* corresponds to the identity operation.
|
||||||
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: Input tensor x of type *T1*. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: Scalar or 1D tensor of type *T_IND* with axis indices for the 1st input along which reduction is performed. Accepted range is `[-r, r-1]` where where `r` is the rank of input tensor, all values must be unique, repeats are not allowed. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: Tensor of the same type as the 1st input tensor and `shape[i] = shapeOf(input1)[i]` for all `i` that is not in the list of axes from the 2nd input. For dimensions from the 2nd input tensor, `shape[i] == 1` if `keep_dims == true`, or `i`-th dimension is removed from the output otherwise.
|
* **1**: The result of *ReduceProd* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T1*: any supported numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Detailed Description**
|
**Examples**
|
||||||
|
|
||||||
Each element in the output is the result of reduction with multiplication operation along dimensions specified by the 2nd input:
|
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = prod[j0,..., jN](x[j0, ..., jN]))
|
|
||||||
|
|
||||||
Where indices i0, ..., iN run through all valid indices for the 1st input and multiplication `prod[j0, ..., jN]` have `jk = ik` for those dimensions `k` that are not in the set of indices specified by the 2nd input of the operation.
|
|
||||||
Corner cases:
|
|
||||||
|
|
||||||
1. When the 2nd input is an empty list, then this operation does nothing, it is an identity.
|
|
||||||
2. When the 2nd input contains all dimensions of the 1st input, this means that a single reduction value is calculated for entire input tensor.
|
|
||||||
|
|
||||||
**Example**
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<layer id="1" type="ReduceProd" ...>
|
<layer id="1" type="ReduceProd" ...>
|
||||||
|
@ -4,46 +4,46 @@
|
|||||||
|
|
||||||
**Category**: *Reduction*
|
**Category**: *Reduction*
|
||||||
|
|
||||||
**Short description**: *ReduceSum* operation performs reduction with addition, on a given input `data`, along dimensions specified by `axes` input.
|
**Short description**: *ReduceSum* operation performs the reduction with addition on a given input `data` along dimensions specified by `axes` input.
|
||||||
|
|
||||||
**Detailed Description**
|
**Detailed Description**
|
||||||
|
|
||||||
*ReduceSum* operation performs reduction with addition, on a given input `data`, along dimensions specified by `axes` additional input.
|
*ReduceSum* operation performs the reduction with addition on a given input `data` along dimensions specified by `axes` input.
|
||||||
Each element in the output is calculated as follows:
|
Each element in the output is calculated as follows:
|
||||||
|
|
||||||
output[i0, i1, ..., iN] = sum[j0,..., jN](x[j0, ..., jN]))
|
output[i0, i1, ..., iN] = sum[j0, ..., jN](x[j0, ..., jN]))
|
||||||
|
|
||||||
where indices i0, ..., iN run through all valid indices for input `data` and summation `sum[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
where indices i0, ..., iN run through all valid indices for input `data`, and summation `sum[j0, ..., jN]` has `jk = ik` for those dimensions `k` that are not in the set of indices specified by `axes` input.
|
||||||
|
|
||||||
Particular cases:
|
Particular cases:
|
||||||
|
|
||||||
1. If `axes` is an empty list, then *ReduceSum* corresponds to identity operation.
|
1. If `axes` is an empty list, *ReduceSum* corresponds to the identity operation.
|
||||||
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for entire input tensor.
|
2. If `axes` contains all dimensions of input `data`, a single reduction value is calculated for the entire input tensor.
|
||||||
|
|
||||||
**Attributes**
|
**Attributes**
|
||||||
|
|
||||||
* *keep_dims*
|
* *keep_dims*
|
||||||
|
|
||||||
* **Description**: If set to `true` it holds axes that are used for reduction. For each such axis, output dimension is equal to 1.
|
* **Description**: If set to `true`, it holds axes that are used for the reduction. For each such axis, the output dimension is equal to 1.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: false
|
* **Default value**: `false`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
* **1**: `data` - A tensor of type *T* and arbitrary shape. **Required.**
|
||||||
|
|
||||||
* **2**: `axes` - Axis indices of `data` input tensor, along which reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]` where `r` is the rank of `data` input tensor. **Required.**
|
* **2**: `axes` - Axis indices of `data` input tensor, along which the reduction is performed. A scalar or 1D tensor of unique elements and type *T_IND*. The range of elements is `[-r, r-1]`, where `r` is the rank of `data` input tensor. **Required.**
|
||||||
|
|
||||||
**Outputs**
|
**Outputs**
|
||||||
|
|
||||||
* **1**: A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`, otherwise the `i`-th dimension is removed from the output.
|
* **1**: The result of *ReduceSum* function applied to `data` input tensor. A tensor of type *T* and `shape[i] = shapeOf(data)[i]` for all `i` dimensions not in `axes` input tensor. For dimensions in `axes`, `shape[i] == 1` if `keep_dims == true`; otherwise, the `i`-th dimension is removed from the output.
|
||||||
|
|
||||||
**Types**
|
**Types**
|
||||||
|
|
||||||
* *T*: any supported numeric type.
|
* *T*: any supported numeric type.
|
||||||
* *T_IND*: `int64` or `int32`.
|
* *T_IND*: any supported integer type.
|
||||||
|
|
||||||
**Examples**
|
**Examples**
|
||||||
|
|
||||||
|
@ -7,9 +7,6 @@
|
|||||||
**Short description**: *CTCGreedyDecoder* performs greedy decoding on the logits given in input (best path).
|
**Short description**: *CTCGreedyDecoder* performs greedy decoding on the logits given in input (best path).
|
||||||
|
|
||||||
**Detailed description**:
|
**Detailed description**:
|
||||||
|
|
||||||
This operation is similar [Reference](https://www.tensorflow.org/api_docs/python/tf/nn/ctc_greedy_decoder)
|
|
||||||
|
|
||||||
Given an input sequence \f$X\f$ of length \f$T\f$, *CTCGreedyDecoder* assumes the probability of a length \f$T\f$ character sequence \f$C\f$ is given by
|
Given an input sequence \f$X\f$ of length \f$T\f$, *CTCGreedyDecoder* assumes the probability of a length \f$T\f$ character sequence \f$C\f$ is given by
|
||||||
\f[
|
\f[
|
||||||
p(C|X) = \prod_{t=1}^{T} p(c_{t}|X)
|
p(C|X) = \prod_{t=1}^{T} p(c_{t}|X)
|
||||||
@ -24,20 +21,23 @@ Sequences in the batch can have different length. The lengths of sequences are c
|
|||||||
* *ctc_merge_repeated*
|
* *ctc_merge_repeated*
|
||||||
|
|
||||||
* **Description**: *ctc_merge_repeated* is a flag for merging repeated labels during the CTC calculation.
|
* **Description**: *ctc_merge_repeated* is a flag for merging repeated labels during the CTC calculation.
|
||||||
* **Range of values**: true or false
|
* **Range of values**: `true` or `false`
|
||||||
* **Type**: `boolean`
|
* **Type**: `boolean`
|
||||||
* **Default value**: true
|
* **Default value**: `true`
|
||||||
* **Required**: *no*
|
* **Required**: *no*
|
||||||
|
|
||||||
**Inputs**
|
**Inputs**
|
||||||
|
|
||||||
* **1**: `data` - Input tensor with a batch of sequences. Type of elements is any supported floating point type. Shape of the tensor is `[T, N, C]`, where `T` is the maximum sequence length, `N` is the batch size and `C` is the number of classes. Required.
|
* **1**: `data` - input tensor with batch of sequences of type `T_F` and shape `[T, N, C]`, where `T` is the maximum sequence length, `N` is the batch size and `C` is the number of classes. **Required.**
|
||||||
|
|
||||||
* **2**: `sequence_mask` - 2D input floating point tensor with sequence masks for each sequence in the batch. Populated with values 0 and 1. Shape of this input is `[T, N]`. Required.
|
* **2**: `sequence_mask` - input tensor with sequence masks for each sequence in the batch of type `T_F` populated with values `0` and `1` and shape `[T, N]`. **Required.**
|
||||||
|
|
||||||
**Output**
|
**Output**
|
||||||
|
|
||||||
* **1**: Output tensor with shape `[N, T, 1, 1]` and integer elements containing final sequence class indices. A final sequence can be shorter that the size `T` of the tensor, all elements that do not code sequence classes are filled with -1. Type of elements is floating point, but all values are integers.
|
* **1**: Output tensor of type `T_F` and shape `[N, T, 1, 1]` which is filled with integer elements containing final sequence class indices. A final sequence can be shorter that the size `T` of the tensor, all elements that do not code sequence classes are filled with `-1`.
|
||||||
|
|
||||||
|
**Types**
|
||||||
|
* *T_F*: any supported floating point type.
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
|
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
## RNNCell <a name="RNNCell"></a> {#openvino_docs_ops_sequence_RNNCell_1}
|
|
||||||
|
|
||||||
**Versioned name**: *RNNCell-1*
|
|
||||||
|
|
||||||
**Category**: Sequence processing
|
|
||||||
|
|
||||||
**Short description**: *RNNCell* represents a single RNN cell that computes the output using the formula described in the [article](https://hackernoon.com/understanding-architecture-of-lstm-cell-from-scratch-with-code-8da40f0b71f4).
|
|
||||||
|
|
||||||
**Attributes**
|
|
||||||
|
|
||||||
* *hidden_size*
|
|
||||||
|
|
||||||
* **Description**: *hidden_size* specifies hidden state size.
|
|
||||||
* **Range of values**: a positive integer
|
|
||||||
* **Type**: `int`
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *yes*
|
|
||||||
|
|
||||||
* *activations*
|
|
||||||
|
|
||||||
* **Description**: activation functions for gates
|
|
||||||
* **Range of values**: any combination of *relu*, *sigmoid*, *tanh*
|
|
||||||
* **Type**: a list of strings
|
|
||||||
* **Default value**: *sigmoid,tanh*
|
|
||||||
* **Required**: *no*
|
|
||||||
|
|
||||||
* *activations_alpha, activations_beta*
|
|
||||||
|
|
||||||
* **Description**: *activations_alpha, activations_beta* functions attributes
|
|
||||||
* **Range of values**: a list of floating-point numbers
|
|
||||||
* **Type**: `float[]`
|
|
||||||
* **Default value**: None
|
|
||||||
* **Required**: *no*
|
|
||||||
|
|
||||||
* *clip*
|
|
||||||
|
|
||||||
* **Description**: *clip* specifies value for tensor clipping to be in *[-C, C]* before activations
|
|
||||||
* **Range of values**: a positive floating-point number
|
|
||||||
* **Type**: `float`
|
|
||||||
* **Default value**: *infinity* that means that the clipping is not applied
|
|
||||||
* **Required**: *no*
|
|
||||||
|
|
||||||
**Inputs**
|
|
||||||
|
|
||||||
* **1**: `X` - 2D ([batch_size, input_size]) input data. Required.
|
|
||||||
|
|
||||||
* **2**: `initial_hidden_state` - 2D ([batch_size, hidden_size]) input hidden state data. Required.
|
|
||||||
|
|
||||||
**Outputs**
|
|
||||||
|
|
||||||
* **1**: `Ho` - 2D ([batch_size, hidden_size]) output hidden state.
|
|
@ -161,16 +161,19 @@ In fact, the OpenVINO does support the "throughput" mode for the CPU, which allo
|
|||||||
|
|
||||||
Internally, the execution resources are split/pinned into execution "streams".
|
Internally, the execution resources are split/pinned into execution "streams".
|
||||||
This feature usually provides much better performance for the networks than batching. This is especially true for the many-core server machines:
|
This feature usually provides much better performance for the networks than batching. This is especially true for the many-core server machines:
|
||||||
|

|
||||||
|
Compared with the batching, the parallelism is somewhat transposed (i.e. performed over inputs, and much less within CNN ops):
|
||||||

|

|
||||||
|
|
||||||
Try the [Benchmark App](../../inference-engine/samples/benchmark_app/README.md) sample and play with number of streams running in parallel. The rule of thumb is tying up to a number of CPU cores on your machine.
|
Try the [Benchmark App](../../inference-engine/samples/benchmark_app/README.md) sample and play with number of streams running in parallel. The rule of thumb is tying up to a number of CPU cores on your machine.
|
||||||
For example, on an 8-core CPU, compare the `-nstreams 1` (which is a legacy, latency-oriented scenario) to the 2, 4, and 8 streams.
|
For example, on an 8-core CPU, compare the `-nstreams 1` (which is a legacy, latency-oriented scenario) to the 2, 4, and 8 streams.
|
||||||
|
Notice that on a multi-socket machine, the bare minimum of streams for a latency scenario equals the number of sockets.
|
||||||
|
|
||||||
In addition, you can play with the batch size to find the throughput sweet spot.
|
In addition, you can play with the batch size to find the throughput sweet spot.
|
||||||
|
|
||||||
If your application is hard or impossible to change in accordance with the multiple-requests logic, consider the "multiple-instance" trick to improve the throughput:
|
If your application is hard or impossible to change in accordance with the multiple-requests logic, consider the "multiple-instance" trick to improve the throughput:
|
||||||
- For multi-socket execution, it is recommended to set [`KEY_CPU_THREADS_NUM`](../IE_DG/supported_plugins/CPU.md) to the number of cores per socket, and run as many instances of the application as you have sockets.
|
- For multi-socket execution, it is recommended to set [`KEY_CPU_THREADS_NUM`](../IE_DG/supported_plugins/CPU.md) to the number of cores per socket, and run as many instances of the application as you have sockets.
|
||||||
- Similarly, for extremely lightweight networks (running faster than 1ms) and/or many-core machines (16+ cores), try limiting the number of CPU inference threads to just `#‍phys` cores and further, while trying to saturate the machine with running multiple instances of the application.
|
- Similarly, for extremely lightweight networks (running faster than 1ms) and/or many-core machines (16+ cores), try limiting the number of CPU inference threads to just `#‍phys` cores and further, while trying to saturate the machine with running multiple instances of the application.
|
||||||
|
|
||||||
|
|
||||||
### GPU Checklist <a name="gpu-checklist"></a>
|
### GPU Checklist <a name="gpu-checklist"></a>
|
||||||
@ -362,20 +365,18 @@ Note that in many cases, you can directly share the (input) data with the Infere
|
|||||||
|
|
||||||
The general approach for sharing data between Inference Engine and media/graphics APIs like Intel® Media Server Studio (Intel® MSS) is based on sharing the *system* memory. That is, in your code, you should map or copy the data from the API to the CPU address space first.
|
The general approach for sharing data between Inference Engine and media/graphics APIs like Intel® Media Server Studio (Intel® MSS) is based on sharing the *system* memory. That is, in your code, you should map or copy the data from the API to the CPU address space first.
|
||||||
|
|
||||||
For Intel MSS, it is recommended to perform a viable pre-processing, for example, crop/resize, and then convert to RGB again with the [Video Processing Procedures (VPP)](https://software.intel.com/en-us/node/696108). Then lock the result and create an Inference Engine blob on top of that. The resulting pointer can be used for the `SetBlob`:
|
For Intel® Media SDK, it is recommended to perform a viable pre-processing, for example, crop/resize, and then convert to RGB again with the [Video Processing Procedures (VPP)](https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onevpl.htm). Then lock the result and create an Inference Engine blob on top of that. The resulting pointer can be used for `SetBlob`:
|
||||||
|
|
||||||
@snippet snippets/dldt_optimization_guide2.cpp part2
|
@snippet snippets/dldt_optimization_guide2.cpp part2
|
||||||
|
|
||||||
**WARNING**: The `InferenceEngine::NHWC` layout is not supported natively by most InferenceEngine plugins so internal conversion might happen.
|
Using the `InferenceEngine::NHWC` layout:
|
||||||
|
|
||||||
@snippet snippets/dldt_optimization_guide3.cpp part3
|
@snippet snippets/dldt_optimization_guide3.cpp part3
|
||||||
|
|
||||||
Alternatively, you can use RGBP (planar RGB) output from Intel MSS. This allows to wrap the (locked) result as regular NCHW which is generally friendly for most plugins (unlike NHWC). Then you can use it with `SetBlob` just like in previous example:
|
Alternatively, you can use an RGBP (planar RGB) output from Intel® Media SDK. This allows you to wrap the (locked) result as regular NCHW. Then you can use it with `SetBlob` just like in the previous example:
|
||||||
|
|
||||||
@snippet snippets/dldt_optimization_guide4.cpp part4
|
@snippet snippets/dldt_optimization_guide4.cpp part4
|
||||||
|
|
||||||
The only downside of this approach is that VPP conversion to RGBP is not hardware accelerated (and performed on the GPU EUs). Also, it is available only on LInux.
|
|
||||||
|
|
||||||
### OpenCV* Interoperability Example <a name="opencv-interoperability"></a>
|
### OpenCV* Interoperability Example <a name="opencv-interoperability"></a>
|
||||||
|
|
||||||
Unlike APIs that use dedicated address space and/or special data layouts (for instance, compressed OpenGL* textures), regular OpenCV data objects like `cv::Mat` reside in the conventional system memory. That is, the memory can be actually shared with the Inference Engine and only data ownership to be transferred.
|
Unlike APIs that use dedicated address space and/or special data layouts (for instance, compressed OpenGL* textures), regular OpenCV data objects like `cv::Mat` reside in the conventional system memory. That is, the memory can be actually shared with the Inference Engine and only data ownership to be transferred.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int FLAGS_bl = 1;
|
int FLAGS_bl = 1;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
#include "cldnn/cldnn_config.hpp"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
#include "cldnn/cldnn_config.hpp"
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
||||||
#define CL_HPP_TARGET_OPENCL_VERSION 120
|
#define CL_HPP_TARGET_OPENCL_VERSION 120
|
||||||
|
|
||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <CL/cl2.hpp>
|
#include <CL/cl2.hpp>
|
||||||
#include <gpu/gpu_context_api_ocl.hpp>
|
#include <gpu/gpu_context_api_ocl.hpp>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
#define CL_HPP_MINIMUM_OPENCL_VERSION 120
|
||||||
#define CL_HPP_TARGET_OPENCL_VERSION 120
|
#define CL_HPP_TARGET_OPENCL_VERSION 120
|
||||||
|
|
||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <CL/cl2.hpp>
|
#include <CL/cl2.hpp>
|
||||||
#include <gpu/gpu_context_api_ocl.hpp>
|
#include <gpu/gpu_context_api_ocl.hpp>
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <gpu/gpu_context_api_va.hpp>
|
#include <gpu/gpu_context_api_va.hpp>
|
||||||
#include <cldnn/cldnn_config.hpp>
|
#include <cldnn/cldnn_config.hpp>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
#include <ngraph/function.hpp>
|
||||||
#include <ngraph/pass/visualize_tree.hpp>
|
#include <ngraph/pass/visualize_tree.hpp>
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
//! [part0]
|
//! [part0]
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/pass/visualize_tree.hpp>
|
#include <ngraph/function.hpp>
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/function.hpp>
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
#include <ngraph/variant.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
InferenceEngine::Core core;
|
InferenceEngine::Core core;
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
|
||||||
#include <ngraph/function.hpp>
|
#include <ngraph/function.hpp>
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
#include <ngraph/variant.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ie_plugin_config.hpp>
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
const std::string output_name = "output_name";
|
const std::string output_name = "output_name";
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
//! [part3]
|
//! [part3]
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
const std::map<std::string, std::string> hddl_config = { { InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES } };
|
const std::map<std::string, std::string> hddl_config = { { InferenceEngine::PluginConfigParams::KEY_PERF_COUNT, InferenceEngine::PluginConfigParams::YES } };
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <multi-device/multi_device_config.hpp>
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::string device_name = "MULTI:HDDL,GPU";
|
std::string device_name = "MULTI:HDDL,GPU";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
std::string deviceName = "Device name";
|
std::string deviceName = "Device name";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/ngraph.hpp>
|
||||||
#include "onnx_import/onnx.hpp"
|
#include "onnx_import/onnx.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/ngraph.hpp>
|
||||||
#include "onnx_import/onnx.hpp"
|
#include "onnx_import/onnx.hpp"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/ngraph.hpp>
|
||||||
#include "onnx_import/onnx.hpp"
|
#include "onnx_import/onnx.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <ngraph/ngraph.hpp>
|
#include <ngraph/ngraph.hpp>
|
||||||
#include "onnx_import/onnx.hpp"
|
#include "onnx_import/onnx.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core/core.hpp>
|
||||||
#include <opencv2/imgcodecs.hpp>
|
#include <opencv2/imgcodecs.hpp>
|
||||||
#include <opencv2/highgui.hpp>
|
#include <opencv2/highgui.hpp>
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include <ie_input_info.hpp>
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include <inference_engine.hpp>
|
|
||||||
#include <opencv2/core/core.hpp>
|
#include <opencv2/core/core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
#include <ie_core.hpp>
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
InferenceEngine::InferRequest inferRequest;
|
InferenceEngine::InferRequest inferRequest;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
InferenceEngine::Core core;
|
InferenceEngine::Core core;
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
//! [part8]
|
//! [part8]
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ie_plugin_config.hpp"
|
|
||||||
#include "hetero/hetero_plugin_config.hpp"
|
|
||||||
|
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
using namespace InferenceEngine;
|
using namespace InferenceEngine;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
InferenceEngine::Core core;
|
InferenceEngine::Core core;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include "ngraph/opsets/opset.hpp"
|
#include "ngraph/opsets/opset.hpp"
|
||||||
#include "ngraph/opsets/opset3.hpp"
|
#include "ngraph/opsets/opset3.hpp"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#include <inference_engine.hpp>
|
#include <ie_core.hpp>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
@ -15,6 +15,8 @@ ie_add_plugin(NAME ${TARGET_NAME}
|
|||||||
SKIP_INSTALL # ATTENTION: uncomment to install component
|
SKIP_INSTALL # ATTENTION: uncomment to install component
|
||||||
VERSION_DEFINES_FOR template_plugin.cpp
|
VERSION_DEFINES_FOR template_plugin.cpp
|
||||||
ADD_CLANG_FORMAT)
|
ADD_CLANG_FORMAT)
|
||||||
|
# Enable support of CC for the plugin
|
||||||
|
ie_mark_target_as_cc(${TARGET_NAME})
|
||||||
|
|
||||||
target_include_directories(${TARGET_NAME} PRIVATE
|
target_include_directories(${TARGET_NAME} PRIVATE
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}"
|
"${CMAKE_CURRENT_SOURCE_DIR}"
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
#include <ie_plugin_config.hpp>
|
#include <ie_plugin_config.hpp>
|
||||||
#include <threading/ie_executor_manager.hpp>
|
#include <threading/ie_executor_manager.hpp>
|
||||||
|
|
||||||
|
#include "ie_icore.hpp"
|
||||||
#include "template/template_config.hpp"
|
#include "template/template_config.hpp"
|
||||||
#include "template_itt.hpp"
|
#include "template_itt.hpp"
|
||||||
#include "template_plugin.hpp"
|
#include "template_plugin.hpp"
|
||||||
|
@ -28,8 +28,6 @@ public:
|
|||||||
|
|
||||||
ExecutableNetwork(std::istream& model, const Configuration& cfg, const std::shared_ptr<Plugin>& plugin);
|
ExecutableNetwork(std::istream& model, const Configuration& cfg, const std::shared_ptr<Plugin>& plugin);
|
||||||
|
|
||||||
~ExecutableNetwork() override = default;
|
|
||||||
|
|
||||||
// Methods from a base class ExecutableNetworkThreadSafeDefault
|
// Methods from a base class ExecutableNetworkThreadSafeDefault
|
||||||
|
|
||||||
void ExportImpl(std::ostream& model) override;
|
void ExportImpl(std::ostream& model) override;
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
#include <ie_plugin_config.hpp>
|
#include <ie_plugin_config.hpp>
|
||||||
#include <ie_algorithm.hpp>
|
#include <ie_algorithm.hpp>
|
||||||
|
|
||||||
#include <hetero/hetero_plugin_config.hpp>
|
|
||||||
#include <threading/ie_executor_manager.hpp>
|
#include <threading/ie_executor_manager.hpp>
|
||||||
|
|
||||||
#include <ngraph/op/util/op_types.hpp>
|
#include <ngraph/op/util/op_types.hpp>
|
||||||
@ -84,7 +83,7 @@ std::shared_ptr<ngraph::Function> TransformNetwork(const std::shared_ptr<const n
|
|||||||
// ! [plugin:transform_network]
|
// ! [plugin:transform_network]
|
||||||
|
|
||||||
// ! [plugin:load_exe_network_impl]
|
// ! [plugin:load_exe_network_impl]
|
||||||
InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network, const ConfigMap& config) {
|
InferenceEngine::IExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network, const ConfigMap& config) {
|
||||||
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::LoadExeNetworkImpl");
|
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::LoadExeNetworkImpl");
|
||||||
|
|
||||||
InferenceEngine::InputsDataMap networkInputs = network.getInputsInfo();
|
InferenceEngine::InputsDataMap networkInputs = network.getInputsInfo();
|
||||||
@ -97,7 +96,7 @@ InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::LoadExeNetworkImpl(const
|
|||||||
// ! [plugin:load_exe_network_impl]
|
// ! [plugin:load_exe_network_impl]
|
||||||
|
|
||||||
// ! [plugin:import_network_impl]
|
// ! [plugin:import_network_impl]
|
||||||
InferenceEngine::ExecutableNetworkInternal::Ptr Plugin::ImportNetworkImpl(std::istream& modelStream, const std::map<std::string, std::string>& config) {
|
InferenceEngine::IExecutableNetworkInternal::Ptr Plugin::ImportNetworkImpl(std::istream& modelStream, const std::map<std::string, std::string>& config) {
|
||||||
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::ImportNetworkImpl");
|
OV_ITT_SCOPED_TASK(itt::domains::TemplatePlugin, "Plugin::ImportNetworkImpl");
|
||||||
|
|
||||||
auto fullConfig = Configuration {config, _cfg};
|
auto fullConfig = Configuration {config, _cfg};
|
||||||
@ -188,7 +187,7 @@ InferenceEngine::QueryNetworkResult Plugin::QueryNetwork(const InferenceEngine::
|
|||||||
// ! [plugin:query_network]
|
// ! [plugin:query_network]
|
||||||
|
|
||||||
// ! [plugin:add_extension]
|
// ! [plugin:add_extension]
|
||||||
void Plugin::AddExtension(InferenceEngine::IExtensionPtr /*extension*/) {
|
void Plugin::AddExtension(const InferenceEngine::IExtensionPtr& /*extension*/) {
|
||||||
// TODO: add extensions if plugin supports extensions
|
// TODO: add extensions if plugin supports extensions
|
||||||
IE_THROW(NotImplemented);
|
IE_THROW(NotImplemented);
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <cpp_interfaces/impl/ie_plugin_internal.hpp>
|
#include <cpp_interfaces/interface/ie_iplugin_internal.hpp>
|
||||||
|
|
||||||
#include "backend.hpp"
|
#include "backend.hpp"
|
||||||
#include "template_config.hpp"
|
#include "template_config.hpp"
|
||||||
@ -13,7 +13,7 @@
|
|||||||
//! [plugin:header]
|
//! [plugin:header]
|
||||||
namespace TemplatePlugin {
|
namespace TemplatePlugin {
|
||||||
|
|
||||||
class Plugin : public InferenceEngine::InferencePluginInternal {
|
class Plugin : public InferenceEngine::IInferencePlugin {
|
||||||
public:
|
public:
|
||||||
using Ptr = std::shared_ptr<Plugin>;
|
using Ptr = std::shared_ptr<Plugin>;
|
||||||
|
|
||||||
@ -23,12 +23,12 @@ public:
|
|||||||
void SetConfig(const std::map<std::string, std::string>& config) override;
|
void SetConfig(const std::map<std::string, std::string>& config) override;
|
||||||
InferenceEngine::QueryNetworkResult QueryNetwork(const InferenceEngine::CNNNetwork& network,
|
InferenceEngine::QueryNetworkResult QueryNetwork(const InferenceEngine::CNNNetwork& network,
|
||||||
const std::map<std::string, std::string>& config) const override;
|
const std::map<std::string, std::string>& config) const override;
|
||||||
InferenceEngine::ExecutableNetworkInternal::Ptr LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network,
|
InferenceEngine::IExecutableNetworkInternal::Ptr LoadExeNetworkImpl(const InferenceEngine::CNNNetwork& network,
|
||||||
const std::map<std::string, std::string>& config) override;
|
const std::map<std::string, std::string>& config) override;
|
||||||
void AddExtension(InferenceEngine::IExtensionPtr extension) override;
|
void AddExtension(const std::shared_ptr<InferenceEngine::IExtension>& extension) override;
|
||||||
InferenceEngine::Parameter GetConfig(const std::string& name, const std::map<std::string, InferenceEngine::Parameter>& options) const override;
|
InferenceEngine::Parameter GetConfig(const std::string& name, const std::map<std::string, InferenceEngine::Parameter>& options) const override;
|
||||||
InferenceEngine::Parameter GetMetric(const std::string& name, const std::map<std::string, InferenceEngine::Parameter>& options) const override;
|
InferenceEngine::Parameter GetMetric(const std::string& name, const std::map<std::string, InferenceEngine::Parameter>& options) const override;
|
||||||
InferenceEngine::ExecutableNetworkInternal::Ptr ImportNetworkImpl(std::istream& model, const std::map<std::string, std::string>& config) override;
|
InferenceEngine::IExecutableNetworkInternal::Ptr ImportNetworkImpl(std::istream& model, const std::map<std::string, std::string>& config) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class ExecutableNetwork;
|
friend class ExecutableNetwork;
|
||||||
|
@ -42,7 +42,6 @@ bool ngraph::pass::AddPreprocessing::run_on_function(std::shared_ptr<ngraph::Fun
|
|||||||
NGRAPH_CHECK(meanImage->getTensorDesc().getPrecision() == InferenceEngine::Precision::FP32,
|
NGRAPH_CHECK(meanImage->getTensorDesc().getPrecision() == InferenceEngine::Precision::FP32,
|
||||||
"Only InferenceEngine::Precision::FP32 precision is supported for PreProcessChannel::meanData");
|
"Only InferenceEngine::Precision::FP32 precision is supported for PreProcessChannel::meanData");
|
||||||
} else {
|
} else {
|
||||||
NGRAPH_CHECK(pInfo[c]->meanData != nullptr, "pInfo[c]->meanData is nullptr");
|
|
||||||
NGRAPH_CHECK(meanImage->getTensorDesc() == pInfo[c]->meanData->getTensorDesc(), "TensorDesc for PreProcessChannel::meanData must be equal");
|
NGRAPH_CHECK(meanImage->getTensorDesc() == pInfo[c]->meanData->getTensorDesc(), "TensorDesc for PreProcessChannel::meanData must be equal");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -20,10 +20,10 @@ class AddPreprocessing;
|
|||||||
* @brief Converts the following preprocessing information to ngraph operations:
|
* @brief Converts the following preprocessing information to ngraph operations:
|
||||||
* - InferenceEngine::PreProcessInfo->PreProcessChannel::meanData -> Subtract
|
* - InferenceEngine::PreProcessInfo->PreProcessChannel::meanData -> Subtract
|
||||||
* - InferenceEngine::PreProcessInfo->PreProcessChannel::meanValue -> Subtract
|
* - InferenceEngine::PreProcessInfo->PreProcessChannel::meanValue -> Subtract
|
||||||
* - InferenceEngine::PreProcessInfo->PreProcessChannel::stdScale -> Multiply
|
* - InferenceEngine::PreProcessInfo->PreProcessChannel::stdScale -> Divide
|
||||||
*
|
*
|
||||||
* The order of operations is the following:
|
* The order of operations is the following:
|
||||||
* (x - mean) * stdScale
|
* (x - mean) / stdScale
|
||||||
*/
|
*/
|
||||||
class ngraph::pass::AddPreprocessing : public ngraph::pass::FunctionPass {
|
class ngraph::pass::AddPreprocessing : public ngraph::pass::FunctionPass {
|
||||||
const InferenceEngine::InputsDataMap& m_inputInfoMap;
|
const InferenceEngine::InputsDataMap& m_inputInfoMap;
|
||||||
|
@ -31,10 +31,10 @@ ngraph::pass::AddStdScale::AddStdScale(const ScaleMap& inputInfoMap) {
|
|||||||
NGRAPH_CHECK(scale_const->get_element_type() == ngraph::element::f32, "Scale for ", param->get_friendly_name(), " must have f32 type");
|
NGRAPH_CHECK(scale_const->get_element_type() == ngraph::element::f32, "Scale for ", param->get_friendly_name(), " must have f32 type");
|
||||||
|
|
||||||
auto copy_param = param->clone_with_new_inputs({});
|
auto copy_param = param->clone_with_new_inputs({});
|
||||||
auto mul = std::make_shared<ngraph::opset3::Multiply>(copy_param, it->second);
|
auto div = std::make_shared<ngraph::opset3::Divide>(copy_param, it->second);
|
||||||
|
|
||||||
ngraph::replace_node(param, mul);
|
ngraph::replace_node(param, div);
|
||||||
mul->set_argument(0, param);
|
div->set_argument(0, param);
|
||||||
|
|
||||||
// Return true as the root node was changed
|
// Return true as the root node was changed
|
||||||
return true;
|
return true;
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
#include "template_function_transformation.hpp"
|
#include "template_function_transformation.hpp"
|
||||||
|
|
||||||
|
#include <openvino/cc/ngraph/itt.hpp>
|
||||||
|
|
||||||
using namespace ngraph;
|
using namespace ngraph;
|
||||||
|
|
||||||
// ! [function_pass:template_transformation_cpp]
|
// ! [function_pass:template_transformation_cpp]
|
||||||
@ -11,6 +13,7 @@ using namespace ngraph;
|
|||||||
NGRAPH_RTTI_DEFINITION(ngraph::pass::MyFunctionTransformation, "MyFunctionTransformation", 0);
|
NGRAPH_RTTI_DEFINITION(ngraph::pass::MyFunctionTransformation, "MyFunctionTransformation", 0);
|
||||||
|
|
||||||
bool pass::MyFunctionTransformation::run_on_function(std::shared_ptr<ngraph::Function> f) {
|
bool pass::MyFunctionTransformation::run_on_function(std::shared_ptr<ngraph::Function> f) {
|
||||||
|
RUN_ON_FUNCTION_SCOPE(MyFunctionTransformation);
|
||||||
// Example transformation code
|
// Example transformation code
|
||||||
NodeVector nodes;
|
NodeVector nodes;
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user