diff --git a/.ci/openvino-onnx/Jenkinsfile b/.ci/openvino-onnx/Jenkinsfile
index 5fe24928798..ff2e8a45125 100644
--- a/.ci/openvino-onnx/Jenkinsfile
+++ b/.ci/openvino-onnx/Jenkinsfile
@@ -155,10 +155,9 @@ def getConfigurationsMap() {
CONFIGURATION_WORKFLOW = { configuration ->
node("OpenVINO") {
+ String workdir = "${HOME}/workspace/${BUILD_NUMBER}_${env.CHANGE_ID}_${configuration.name}"
try {
PROJECT_NAME = "openvino"
- String workdir = "${HOME}/workspace/${BUILD_NUMBER}_${env.CHANGE_ID}_${configuration.name}"
-
stage("Clone repository") {
prepare_repository(workdir)
}
@@ -185,10 +184,10 @@ CONFIGURATION_WORKFLOW = { configuration ->
}
finally {
stage("Cleanup") {
- deleteDir()
String docker_container_name = get_docker_container_name(configuration)
sh """
docker rm -f ${docker_container_name}
+ rm -rf ${workdir}
"""
}
}
diff --git a/.github/workflows/mo.yml b/.github/workflows/mo.yml
index eb2ea91484e..ebc0827adb0 100644
--- a/.github/workflows/mo.yml
+++ b/.github/workflows/mo.yml
@@ -62,42 +62,4 @@ jobs:
mkdir ../mo-ut-logs
python3 -m xmlrunner discover -p *_test.py --output=../mo-ut-logs
working-directory: model-optimizer
-
- build_wheel:
- name: Build Python wheel
- runs-on: ubuntu-18.04
- steps:
- - uses: actions/checkout@v2
- - name: Install dependencies
- run: |
- python3 -m pip install --upgrade pip
- python3 -m pip install wheel setuptools
- python3 -m pip install tensorflow==2.3.0
-
- - name: Build
- run: |
- python3 setup.py sdist bdist_wheel
- working-directory: model-optimizer
-
- - name: Test package content
- run: |
- echo "src = open('openvino_mo.egg-info/SOURCES.txt', 'rt').read().split()" | tee -a test_wheel.py
- echo "ref = open('automation/package_BOM.txt', 'rt').read().split()" | tee -a test_wheel.py
- echo "for name in ref:" | tee -a test_wheel.py
- echo " if name.endswith('.py'):" | tee -a test_wheel.py
- echo " assert name in src or './' + name in src, name + ' file missed'" | tee -a test_wheel.py
- python3 test_wheel.py
- working-directory: model-optimizer
-
- - name: Test conversion
- run: |
- wget -q http://download.tensorflow.org/models/mobilenet_v1_2018_08_02/mobilenet_v1_1.0_224.tgz
- tar -xf mobilenet_v1_1.0_224.tgz
- python3 -m pip install model-optimizer/dist/*.whl
- python3 -m mo --input_model mobilenet_v1_1.0_224_frozen.pb --input_shape "[1,224,224,3]"
-
- - uses: actions/upload-artifact@v2
- with:
- name: mo_wheel
- path: "model-optimizer/dist/*.whl"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e0706a72e87..3602750435c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,10 +169,11 @@ ie_shellcheck_process(DIRECTORY "${OpenVINO_MAIN_SOURCE_DIR}"
"${IE_MAIN_SOURCE_DIR}/thirdparty"
"${IE_MAIN_SOURCE_DIR}/temp"
# TODO fix and enable back:
- "${OpenVINO_MAIN_SOURCE_DIR}/scripts/install_dependencies"
- "${OpenVINO_MAIN_SOURCE_DIR}/scripts/demo"
- "${OpenVINO_MAIN_SOURCE_DIR}/ngraph"
- "${IE_MAIN_SOURCE_DIR}/scripts")
+ "${OpenVINO_MAIN_SOURCE_DIR}/inference-engine/scripts/dependencies.sh"
+ "${OpenVINO_MAIN_SOURCE_DIR}/scripts/install_dependencies/install_NEO_OCL_driver.sh"
+ "${OpenVINO_MAIN_SOURCE_DIR}/scripts/install_dependencies/install_openvino_dependencies.sh"
+ "${OpenVINO_MAIN_SOURCE_DIR}/ngraph/python/tests/test_onnx/model_zoo_preprocess.sh"
+ )
#
# cpack
diff --git a/docs/ops/infrastructure/Parameter_1.md b/docs/ops/infrastructure/Parameter_1.md
index 807a606a375..879880002e6 100644
--- a/docs/ops/infrastructure/Parameter_1.md
+++ b/docs/ops/infrastructure/Parameter_1.md
@@ -11,18 +11,27 @@
* *element_type*
* **Description**: the type of element of output tensor
- * **Range of values**: u8, u16, u32, u64, i8, i16, i32, i64, f16, f32, boolean, bf16
- * **Type**: string
+ * **Range of values**: u1, u4, u8, u16, u32, u64, i4, i8, i16, i32, i64, f16, f32, boolean, bf16
+ * **Type**: `string`
* **Default value**: None
- * **Required**: *Yes*
+ * **Required**: *yes*
* *shape*
* **Description**: the shape of the output tensor
- * **Range of values**: list of non-negative integers, empty list is allowed that means 0D or scalar tensor
- * **Type**: int[]
+ * **Range of values**: list of non-negative integers, empty list is allowed, which means 0D or scalar tensor
+ * **Type**: `int[]`
* **Default value**: None
- * **Required**: *Yes*
+ * **Required**: *yes*
+
+
+**Outputs**
+
+* **1**: Output tensor of type *T* and shape equal to *shape* attribute.
+
+**Types**
+
+* *T*: any type from *element type* values.
**Example**
@@ -38,4 +47,4 @@
-```
\ No newline at end of file
+```
diff --git a/docs/ops/movement/ExtractImagePatches_3.md b/docs/ops/movement/ExtractImagePatches_3.md
index 3604d3b49ca..5046854ee22 100644
--- a/docs/ops/movement/ExtractImagePatches_3.md
+++ b/docs/ops/movement/ExtractImagePatches_3.md
@@ -8,9 +8,7 @@
**Detailed description**:
-The *ExtractImagePatches* operation is similar to the TensorFlow* operation [ExtractImagePatches](https://www.tensorflow.org/api_docs/python/tf/image/extract_patches).
-
-This op extracts patches of shape `sizes` which are `strides` apart in the input image. The output elements are taken from the input at intervals given by the `rate` argument, as in dilated convolutions.
+The *ExtractImagePatches* operation extracts patches of shape `sizes` which are `strides` apart in the input image. The output elements are taken from the input at intervals given by the `rate` argument, as in dilated convolutions.
The result is a 4D tensor containing image patches with size `size[0] * size[1] * depth` vectorized in the "depth" dimension.
@@ -92,20 +90,23 @@ The "auto_pad" attribute has no effect on the size of each patch, it determines
Image is a `1 x 1 x 10 x 10` array that contains the numbers 1 through 100. We use the symbol `x` to mark output patches.
1. `sizes="3,3", strides="5,5", rates="1,1", auto_pad="valid"`
+\f[
+ \begin{bmatrix}
+ x & x & x & 4 & 5 & x & x & x & 9 & 10 \\
+ x & x & x & 14 & 15 & x & x & x & 19 & 20 \\
+ x & x & x & 24 & 25 & x & x & x & 29 & 30 \\
+ 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 \\
+ 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 \\
+ x & x & x & 54 & 55 & x & x & x & 59 & 60 \\
+ x & x & x & 64 & 65 & x & x & x & 69 & 70 \\
+ x & x & x & 74 & 75 & x & x & x & 79 & 80 \\
+ 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 \\
+ 91 & 92 & 93 & 94 & 95 & 96 & 79 & 98 & 99 & 100
+ \end{bmatrix}
+\f]
- x x x 4 5 x x x 9 10
- x x x 14 15 x x x 19 20
- x x x 24 25 x x x 29 30
- 31 32 33 34 35 36 37 38 39 40
- 41 42 43 44 45 46 47 48 49 50
- x x x 54 55 x x x 59 60
- x x x 64 65 x x x 69 70
- x x x 74 75 x x x 79 80
- 81 82 83 84 85 86 87 88 89 90
- 91 92 93 94 95 96 97 98 99 100
-
output:
-
+```
[[[[ 1 6]
[51 56]]
@@ -132,25 +133,28 @@ Image is a `1 x 1 x 10 x 10` array that contains the numbers 1 through 100. We u
[[23 28]
[73 78]]]]
-
+```
output shape: `[1, 9, 2, 2]`
2. `sizes="4,4", strides="8,8", rates="1,1", auto_pad="valid"`
-
- x x x x 5 6 7 8 9 10
- x x x x 15 16 17 18 19 20
- x x x x 25 26 27 28 29 30
- x x x x 35 36 37 38 39 40
- 41 42 43 44 45 46 47 48 49 50
- 51 52 53 54 55 56 57 58 59 60
- 61 62 63 64 65 66 67 68 69 70
- 71 72 73 74 75 76 77 78 79 80
- 81 82 83 84 85 86 87 88 89 90
- 91 92 93 94 95 96 97 98 99 100
+\f[
+ \begin{bmatrix}
+ x & x & x & x & 5 & 6 & 7 & 8 & 9 & 10 \\
+ x & x & x & x & 15 & 16 & 17 & 18 & 19 & 20 \\
+ x & x & x & x & 25 & 26 & 27 & 28 & 29 & 30 \\
+ x & x & x & x & 35 & 36 & 37 & 38 & 39 & 40 \\
+ 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 \\
+ 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 \\
+ 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 \\
+ 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 \\
+ 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 \\
+ 91 & 92 & 93 & 94 & 95 & 96 & 79 & 98 & 99 & 100
+ \end{bmatrix}
+\f]
output:
-
- [[[[ 1]]
+```
+ [[[[ 1]]
[[ 2]]
@@ -180,28 +184,30 @@ Image is a `1 x 1 x 10 x 10` array that contains the numbers 1 through 100. We u
[[33]]
- [[34]]]]
-
+ [[34]]]]
+```
output shape: `[1, 16, 1, 1]`
3. `sizes="4,4", strides="9,9", rates="1,1", auto_pad="same_upper"`
-
- x x x x 0 0 0 0 0 x x x x
- x x x x 4 5 6 7 8 x x x x
- x x x x 14 15 16 17 18 x x x x
- x x x x 24 25 26 27 28 x x x x
- 0 31 32 33 34 35 36 37 38 39 40 0 0
- 0 41 42 43 44 45 46 47 48 49 50 0 0
- 0 51 52 53 54 55 56 57 58 59 60 0 0
- 0 61 62 63 64 65 66 67 68 69 70 0 0
- 0 71 72 73 74 75 76 77 78 79 80 0 0
- x x x x 84 85 86 87 88 x x x x
- x x x x 94 95 96 97 98 x x x x
- x x x x 0 0 0 0 0 x x x x
- x x x x 0 0 0 0 0 x x x x
-
+\f[
+ \begin{bmatrix}
+ x & x & x & x & 0 & 0 & 0 & 0 & 0 & x & x & x & x\\
+ x & x & x & x & 4 & 5 & 6 & 7 & 8 & x & x & x & x\\
+ x & x & x & x & 14 & 15 & 16 & 17 & 18 & x & x & x & x\\
+ x & x & x & x & 24 & 25 & 26 & 27 & 28 & x & x & x & x\\
+ 0 & 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 & 0 & 0\\
+ 0 & 41 & 42 & 43 & 44 & 45 & 46 & 47 & 48 & 49 & 50 & 0 & 0\\
+ 0 & 51 & 52 & 53 & 54 & 55 & 56 & 57 & 58 & 59 & 60 & 0 & 0\\
+ 0 & 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 & 0 & 0\\
+ 0 & 71 & 72 & 73 & 74 & 75 & 76 & 77 & 78 & 79 & 80 & 0 & 0\\
+ x & x & x & x & 84 & 85 & 86 & 87 & 88 & x & x & x & x\\
+ x & x & x & x & 94 & 95 & 96 & 79 & 98 & x & x & x & x\\
+ x & x & x & x & 0 & 0 & 0 & 0 & 0 & x & x & x & x\\
+ x & x & x & x & 0 & 0 & 0 & 0 & 0 & x & x & x & x
+ \end{bmatrix}
+\f]
output:
-
+```
[[[[ 0 0]
[ 0 89]]
@@ -249,25 +255,28 @@ Image is a `1 x 1 x 10 x 10` array that contains the numbers 1 through 100. We u
[[ 23 0]
[ 0 0]]]]
-
+```
output shape: `[1, 16, 2, 2]`
4. `sizes="3,3", strides="5,5", rates="2,2", auto_pad="valid"`
This time we use the symbols `x`, `y`, `z` and `k` to distinguish the patches:
-
- x 2 x 4 x y 7 y 9 y
- 11 12 13 14 15 16 17 18 19 20
- x 22 x 24 x y 27 y 29 y
- 31 32 33 34 35 36 37 38 39 40
- x 42 x 44 x y 47 y 49 y
- z 52 z 54 z k 57 k 59 k
- 61 62 63 64 65 66 67 68 69 70
- z 72 z 74 z k 77 k 79 k
- 81 82 83 84 85 86 87 88 89 90
- z 92 z 94 z k 97 k 99 k
-
- output:
+\f[
+ \begin{bmatrix}
+ x & 2 & x & 4 & x & y & 7 & y & 9 & y \\
+ 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \\
+ x & 22 & x & 24 & x & y & 27 & y & 29 & y \\
+ 31 & 32 & 33 & 34 & 35 & 36 & 37 & 38 & 39 & 40 \\
+ x & 42 & x & 44 & x & y & 47 & y & 49 & y \\
+ z & 52 & z & 54 & z & k & 57 & k & 59 & k \\
+ 61 & 62 & 63 & 64 & 65 & 66 & 67 & 68 & 69 & 70 \\
+ z & 72 & z & 74 & z & k & 77 & k & 79 & k \\
+ 81 & 82 & 83 & 84 & 85 & 86 & 87 & 88 & 89 & 90 \\
+ z & 92 & z & 94 & z & k & 79 & k & 99 & k
+ \end{bmatrix}
+\f]
+ output:
+```
[[[[ 1 6]
[ 51 56]]
@@ -294,26 +303,30 @@ This time we use the symbols `x`, `y`, `z` and `k` to distinguish the patches:
[[ 45 50]
[ 95 100]]]]
-
+```
output_shape: `[1, 9, 2, 2]`
5. `sizes="2,2", strides="3,3", rates="1,1", auto_pad="valid"`
Image is a `1 x 2 x 5 x 5` array that contains two feature maps where feature map with coordinate 0 contains numbers in a range `[1, 25]` and feature map with coordinate 1 contains numbers in a range `[26, 50]`
- x x 3 x x
- 6 7 8 x x
- 11 12 13 14 15
- x x 18 x x
- x x 23 x x
-
- x x 28 x x
- x x 33 x x
- 36 37 38 39 40
- x x 43 x x
- x x 48 x x
-
+\f[
+ \begin{bmatrix}
+ x & x & 3 & x & x\\
+ x & x & 8 & x & x\\
+ 11 & 12 & 13 & 14 & 15\\
+ x & x & 18 & x & x\\
+ x & x & 23 & x & x
+ \end{bmatrix}\\
+ \begin{bmatrix}
+ x & x & 28 & x & x\\
+ x & x & 33 & x & x\\
+ 36 & 37 & 38 & 39 & 40\\
+ x & x & 43 & x & x\\
+ x & x & 48 & x & x
+ \end{bmatrix}
+\f]
output:
-
+```
[[[[ 1 4]
[16 19]]
@@ -337,5 +350,5 @@ Image is a `1 x 2 x 5 x 5` array that contains two feature maps where feature ma
[[32 35]
[47 50]]]]
-
+```
output shape: `[1, 8, 2, 2]`
diff --git a/docs/ops/movement/ShuffleChannels_1.md b/docs/ops/movement/ShuffleChannels_1.md
index ec7cfc75d9d..e97f3350d2a 100644
--- a/docs/ops/movement/ShuffleChannels_1.md
+++ b/docs/ops/movement/ShuffleChannels_1.md
@@ -8,12 +8,37 @@
**Short description**: *ShuffleChannels* permutes data in the channel dimension of the input tensor.
+**Detailed description**:
+
+Input tensor of `data_shape` is always interpreted as 4D tensor with the following shape:
+
+ dim 0: data_shape[0] * data_shape[1] * ... * data_shape[axis-1]
+ (or 1 if axis == 0)
+ dim 1: group
+ dim 2: data_shape[axis] / group
+ dim 3: data_shape[axis+1] * data_shape[axis+2] * ... * data_shape[data_shape.size()-1]
+ (or 1 if axis points to last dimension)
+
+
+Trailing and leading to `axis` dimensions are flattened and reshaped back to the original shape after channels shuffling.
+
+
+The operation is equivalent to the following transformation of the input tensor `x` of shape `[N, C, H, W]` and `axis = 1`:
+
+\f[
+x' = reshape(x, [N, group, C / group, H * W])\\
+x'' = transpose(x', [0, 2, 1, 3])\\
+y = reshape(x'', [N, C, H, W])\\
+\f]
+
+where `group` is the layer attribute described below.
+
**Attributes**:
* *axis*
* **Description**: *axis* specifies the index of a channel dimension.
- * **Range of values**: an integer number in the range [-4, 3]
+ * **Range of values**: an integer number in the range `[-rank(data_shape), rank(data_shape) - 1]`
* **Type**: `int`
* **Default value**: 1
* **Required**: *No*
@@ -21,30 +46,22 @@
* *group*
* **Description**: *group* specifies the number of groups to split the channel dimension into. This number must evenly divide the channel dimension size.
- * **Range of values**: a positive integer
+ * **Range of values**: a positive integer in the range `[1, data_shape[axis]]`
* **Type**: `int`
* **Default value**: 1
* **Required**: *No*
**Inputs**:
-* **1**: 4D input tensor of any supported data type. Required.
+* **1**: `data` input tensor of type *T* and rank greater or equal to 1. **Required.**
**Outputs**:
-* **1**: 4D input tensor with shape and element type as for the input tensor.
+* **1**: Output tensor with element type *T* and same shape as the input tensor.
-**Mathematical Formulation**
+**Types**
-The operation is the equivalent with the following transformation of the input tensor *x* of shape *[N, C, H, W]*:
-
-```
-x' = reshape(x, [N, group, C / group, H * W])
-x'' = transpose(x', [0, 2, 1, 3])
-y = reshape(x'', [N, C, H, W])
-```
-
-where `group` is the layer parameter described above and the `axis = 1`.
+* *T*: any supported numeric type.
**Example**
@@ -68,4 +85,4 @@ where `group` is the layer parameter described above and the `axis = 1`.
-```
\ No newline at end of file
+```
diff --git a/docs/ops/movement/SpaceToBatch_2.md b/docs/ops/movement/SpaceToBatch_2.md
index 66c064e27be..eea9df8ced1 100644
--- a/docs/ops/movement/SpaceToBatch_2.md
+++ b/docs/ops/movement/SpaceToBatch_2.md
@@ -8,20 +8,20 @@
**Detailed description**:
-The *SpaceToBatch* operation is similar to the TensorFlow* operation [SpaceToBatchND](https://www.tensorflow.org/api_docs/python/tf/space_to_batch_nd)
-
The operation is equivalent to the following transformation of the input tensor `data` of shape `[batch, D_1, D_2 ... D_{N - 1}]` and `block_shape`, `pads_begin`, `pads_end` of shapes `[N]` to *Y* output tensor.
- Zero-pad the start and end of dimensions [D_0, ..., D_{N - 1}] of the input according to `pads_begin` and `pads_end`:
- note: P_0 for batch dimension is expected to be 0 (no-padding).
- x = [batch + P_0, D_1 + P_1, D_2 + P_2, ..., D_{N - 1} + P_{N - 1}], where P_i = pads_begin[i] + pads_end[i]
+Zero-pad the start and end of dimensions \f$[D_0, \dots, D_{N - 1}]\f$ of the input according to `pads_begin` and `pads_end`:
- note: B_0 for batch is ignored.
- x' = reshape(x, [batch, (D_1 + P_1) / B_1, B_1, (D_2 + P_2) / B_2, B_2, ..., (D_{N - 1} + P_{N - 1}) / B_{N - 1}, B_{N - 1}]), where B_i = block_shape[i]
+\f[x = [batch + P_0, D_1 + P_1, D_2 + P_2, \dots, D_{N - 1} + P_{N - 1}]\f]
+\f[x' = reshape(x, [batch, \frac{D_1 + P_1}{B_1}, B_1, \frac{D_2 + P_2}{B_2}, B_2, \dots, \frac{D_{N - 1} + P_{N - 1}}{B_{N - 1}}, B_{N - 1}])\f]
+\f[x'' = transpose(x', [2, 4, \dots, (N - 1) + (N - 1), 0, 1, 3, \dots, N + (N - 1)])\f]
+\f[y = reshape(x'', [batch \times B_1 \times \dots \times B_{N - 1}, \frac{D_1 + P_1}{B_1}, \frac{D_2 + P_2}{B_2}, \dots, \frac{D_{N - 1} + P_{N - 1}}{B_{N - 1}}]\f]
- x'' = transpose(x', [2, 4, ..., (N - 1) + (N - 1), 0, 1, 3, ..., N + (N - 1)])
-
- y = reshape(x'', [batch * B_1 * ... * B_{N - 1}, (D_1 + P_1) / B_1, (D_2 + P_2) / B_2, ... , (D_{N - 1} + P_{N - 1}) / B_{N - 1}])
+where
+- \f$P_i\f$ = pads_begin[i] + pads_end[i]
+- \f$B_i\f$ = block_shape[i]
+- \f$P_0\f$ for batch dimension is expected to be 0 (no-padding)
+- \f$B_0\f$ for batch is ignored
**Attributes**
@@ -36,7 +36,7 @@ The operation is equivalent to the following transformation of the input tensor
**Outputs**
-* **1**: N-D tensor with shape `[batch * block_shape[0] * block_shape[1] * ... * block_shape[N - 1], (pads_begin[1] + D_1 + pads_end[1]) / block_shape[1], (pads_begin[2] + D_2 + pads_end[2]) / block_shape[2], ..., (pads_begin[N - 1] + D_{N - 1} + pads_end[N - 1]) / block_shape[N - 1]` of the same type as `data` input.
+* **1**: N-D tensor with shape `[batch * block_shape[0] * block_shape[1] * ... * block_shape[N - 1], (D_1 + pads_begin[1] + pads_end[1]) / block_shape[1], (D_2 + pads_begin[2] + pads_end[2]) / block_shape[2], ..., (D_{N -1} + pads_begin[N - 1] + pads_end[N - 1]) / block_shape[N - 1]` of the same type as `data` input.
**Types**
diff --git a/docs/ops/movement/StridedSlice_1.md b/docs/ops/movement/StridedSlice_1.md
index 6c07665d8f9..41742e20652 100644
--- a/docs/ops/movement/StridedSlice_1.md
+++ b/docs/ops/movement/StridedSlice_1.md
@@ -4,14 +4,13 @@
**Category**: Data movement operation
-**Short description**: *StridedSlice* extracts a strided slice of a tensor.
- It is similar to generalized array indexing in Python\*.
+**Short description**: *StridedSlice* extracts a strided slice of a tensor.
**Attributes**
* *begin_mask*
- * **Description**: *begin_mask* is a bit mask. *begin_mask[i]* equal to 1 means that the corresponding dimension of the `begin` input is ignored and the 'real' beginning of the tensor is used along corresponding dimension.
+ * **Description**: *begin_mask* is a bit mask. *begin_mask[i]* equal to `1` means that the corresponding dimension of the `begin` input is ignored and the 'real' beginning of the tensor is used along corresponding dimension.
* **Range of values**: a list of `0`s and `1`s
* **Type**: `int[]`
* **Default value**: None
@@ -19,7 +18,7 @@
* *end_mask*
- * **Description**: *end_mask* is a bit mask. If *end_mask[i]* is 1, the corresponding dimension of the `end` input is ignored and the real 'end' of the tensor is used along corresponding dimension.
+ * **Description**: *end_mask* is a bit mask. If *end_mask[i]* is `1`, the corresponding dimension of the `end` input is ignored and the real 'end' of the tensor is used along corresponding dimension.
* **Range of values**: a list of `0`s and `1`s
* **Type**: `int[]`
* **Default value**: None
@@ -27,7 +26,7 @@
* *new_axis_mask*
- * **Description**: *new_axis_mask* is a bit mask. If *new_axis_mask[i]* is 1, a length 1 dimension is inserted on the `i`-th position of input tensor.
+ * **Description**: *new_axis_mask* is a bit mask. If *new_axis_mask[i]* is `1`, a length 1 dimension is inserted on the `i`-th position of input tensor.
* **Range of values**: a list of `0`s and `1`s
* **Type**: `int[]`
* **Default value**: `[0]`
@@ -35,7 +34,7 @@
* *shrink_axis_mask*
- * **Description**: *shrink_axis_mask* is a bit mask. If *shrink_axis_mask[i]* is 1, the dimension on the `i`-th position is deleted.
+ * **Description**: *shrink_axis_mask* is a bit mask. If *shrink_axis_mask[i]* is `1`, the dimension on the `i`-th position is deleted.
* **Range of values**: a list of `0`s and `1`s
* **Type**: `int[]`
* **Default value**: `[0]`
@@ -51,21 +50,83 @@
**Inputs**:
-* **1**: Multidimensional input tensor to be sliced. Required.
+* **1**: `data` - input tensor to be sliced of type `T` and arbitrary shape. **Required.**
-* **2**: `begin` input - 1D input tensor with begin indexes for input tensor slicing. Required.
- Out-of-bounds values are silently clamped. If `begin_mask[i]` is 1, the value of `begin[i]` is ignored
- and the range of the appropriate dimension starts from 0.
- Negative values mean indexing starts from the end. For example, if `foo=[1,2,3]`, `begin[0]=-1` means `begin[0]=3`.
+* **2**: `begin` - 1D tensor of type `T_IND` with begin indexes for input tensor slicing. **Required.**
+ Out-of-bounds values are silently clamped. If `begin_mask[i]` is `1`, the value of `begin[i]` is ignored and the range of the appropriate dimension starts from `0`. Negative values mean indexing starts from the end. For example, if `data=[1,2,3]`, `begin[0]=-1` means `begin[0]=3`.
-* **3**: `end` input - 1D input tensor with end indexes for input tensor slicing. Required.
- Out-of-bounds values will be silently clamped. If `end_mask[i]` is 1, the value of `end[i]` is ignored
- and the full range of the appropriate dimension is used instead.
- Negative values mean indexing starts from the end. For example, if `foo=[1,2,3]`, `end[0]=-1` means `end[0]=3`.
+* **3**: `end` - 1D tensor of type `T_IND` with end indexes for input tensor slicing. **Required.**
+ Out-of-bounds values will be silently clamped. If `end_mask[i]` is `1`, the value of `end[i]` is ignored and the full range of the appropriate dimension is used instead. Negative values mean indexing starts from the end. For example, if `data=[1,2,3]`, `end[0]=-1` means `end[0]=3`.
-* **4**: `stride` input - 1D input tensor with strides. Optional.
+* **4**: `stride` - 1D tensor of type `T_IND` with strides. **Optional.**
-**Example**
+**Types**
+* *T*: any supported type.
+* *T_IND*: any supported integer type.
+
+**Example**
+Example of `begin_mask` & `end_mask` usage.
+```xml
+
+
+
+
+ 2
+ 3
+ 4
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
+
+
+```
+
+Example of `new_axis_mask` usage.
+```xml
+
+
+
+
+ 2
+ 3
+ 4
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
+
+
+```
+
+Example of `shrink_axis_mask` usage.
```xml
@@ -96,4 +157,4 @@
-```
\ No newline at end of file
+```
diff --git a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp
index 85313f410d3..e0c986ad8b5 100644
--- a/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp
+++ b/docs/template_plugin/tests/functional/shared_tests_instances/single_layer_tests/reshape.cpp
@@ -2,43 +2,58 @@
// SPDX-License-Identifier: Apache-2.0
//
+#include "single_layer_tests/reshape.hpp"
+
#include
-#include "single_layer_tests/reshape.hpp"
#include "common_test_utils/test_constants.hpp"
using namespace LayerTestsDefinitions;
namespace {
const std::vector netPrecisions = {
- InferenceEngine::Precision::FP32,
+ InferenceEngine::Precision::FP32,
};
-INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheckDynBatch, ReshapeLayerTest,
- ::testing::Combine(
- ::testing::Values(true),
- ::testing::ValuesIn(netPrecisions),
- ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
- ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
- ::testing::Values(InferenceEngine::Layout::ANY),
- ::testing::Values(InferenceEngine::Layout::ANY),
- ::testing::Values(std::vector({30, 30, 30, 30})),
- ::testing::Values(std::vector({30, 30, 30, 30})),
- ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
- ::testing::Values(std::map({}))),
- ReshapeLayerTest::getTestCaseName);
+INSTANTIATE_TEST_CASE_P(
+ smoke_ReshapeCheckDynBatch, ReshapeLayerTestRevise,
+ ::testing::Combine(
+ ::testing::Values(true), ::testing::ValuesIn(netPrecisions),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(std::vector({30, 30, 30, 30})),
+ ::testing::Values(std::vector({30, 30, 30, 30})),
+ ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
+ ::testing::Values(std::map({}))),
+ ReshapeLayerTestRevise::getTestCaseName);
-INSTANTIATE_TEST_CASE_P(smoke_ReshapeCheck, ReshapeLayerTest,
- ::testing::Combine(
- ::testing::Values(true),
- ::testing::ValuesIn(netPrecisions),
- ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
- ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
- ::testing::Values(InferenceEngine::Layout::ANY),
- ::testing::Values(InferenceEngine::Layout::ANY),
- ::testing::Values(std::vector({10, 10, 10, 10})),
- ::testing::Values(std::vector({10, 0, 100})),
- ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
- ::testing::Values(std::map({}))),
- ReshapeLayerTest::getTestCaseName);
-} // namespace
\ No newline at end of file
+INSTANTIATE_TEST_CASE_P(
+ smoke_ReshapeCheck, ReshapeLayerTestRevise,
+ ::testing::Combine(
+ ::testing::Values(true), ::testing::ValuesIn(netPrecisions),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(std::vector({10, 10, 10, 10})),
+ ::testing::Values(std::vector({10, 0, 100})),
+ ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
+ ::testing::Values(std::map({}))),
+ ReshapeLayerTestRevise::getTestCaseName);
+
+INSTANTIATE_TEST_CASE_P(
+ smoke_ReshapeCheckNegative, ReshapeLayerTestRevise,
+ ::testing::Combine(
+ ::testing::Values(true), ::testing::ValuesIn(netPrecisions),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Precision::UNSPECIFIED),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(InferenceEngine::Layout::ANY),
+ ::testing::Values(std::vector({10, 10, 10, 10})),
+ ::testing::Values(std::vector({10, -1, 100})),
+ ::testing::Values(CommonTestUtils::DEVICE_TEMPLATE),
+ ::testing::Values(std::map({}))),
+ ReshapeLayerTestRevise::getTestCaseName);
+} // namespace
diff --git a/inference-engine/ie_bridges/python/CMakeLists.txt b/inference-engine/ie_bridges/python/CMakeLists.txt
index 5c80af7f574..b8216b0cb34 100644
--- a/inference-engine/ie_bridges/python/CMakeLists.txt
+++ b/inference-engine/ie_bridges/python/CMakeLists.txt
@@ -68,6 +68,10 @@ if(ENABLE_WHEEL)
add_subdirectory(wheel)
endif()
+if (NGRAPH_PYTHON_BUILD_ENABLE)
+ add_dependencies(ie_api _pyngraph)
+endif()
+
# install
ie_cpack_add_component(${PYTHON_VERSION})
diff --git a/inference-engine/scripts/run_tests_myriad_multistick.sh b/inference-engine/scripts/run_tests_myriad_multistick.sh
index 468817c6f75..73befb9b366 100755
--- a/inference-engine/scripts/run_tests_myriad_multistick.sh
+++ b/inference-engine/scripts/run_tests_myriad_multistick.sh
@@ -55,7 +55,7 @@ fi
if [[ "${APPS_TO_RUN}" -ge 4 ]] ; then
# For more then 4 multidevice testing
- for (( VAR = 4; VAR <= ${APPS_TO_RUN}; ++VAR )); do
+ for (( VAR = 4; VAR <= APPS_TO_RUN; ++VAR )); do
./${APP_NAME} --gtest_filter=*VPURegTest*YOLO*myriad* &
pids+=" $!"
done
diff --git a/inference-engine/src/cldnn_engine/CMakeLists.txt b/inference-engine/src/cldnn_engine/CMakeLists.txt
index ff138843dc4..161d6f16a8d 100644
--- a/inference-engine/src/cldnn_engine/CMakeLists.txt
+++ b/inference-engine/src/cldnn_engine/CMakeLists.txt
@@ -33,7 +33,7 @@ target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
$
${CLDNN__OCL_ICD_INCDIRS}
- ${CLDNN_TOP_FOLDER})
+ ${CLDNN_TOP_FOLDER}/api)
set_target_properties(${TARGET_NAME} PROPERTIES INTERPROCEDURAL_OPTIMIZATION_RELEASE ${ENABLE_LTO})
diff --git a/inference-engine/src/cldnn_engine/cldnn_common_utils.h b/inference-engine/src/cldnn_engine/cldnn_common_utils.h
index c374a71a465..f41f2d8e134 100644
--- a/inference-engine/src/cldnn_engine/cldnn_common_utils.h
+++ b/inference-engine/src/cldnn_engine/cldnn_common_utils.h
@@ -5,7 +5,7 @@
#pragma once
#include
-#include
+#include
#include "ngraph/type/element_type.hpp"
diff --git a/inference-engine/src/cldnn_engine/cldnn_config.h b/inference-engine/src/cldnn_engine/cldnn_config.h
index 8c6d5d6c921..873c01e2188 100644
--- a/inference-engine/src/cldnn_engine/cldnn_config.h
+++ b/inference-engine/src/cldnn_engine/cldnn_config.h
@@ -9,7 +9,7 @@
#include "cldnn_custom_layer.h"
-#include
+#include
namespace CLDNNPlugin {
diff --git a/inference-engine/src/cldnn_engine/cldnn_custom_layer.h b/inference-engine/src/cldnn_engine/cldnn_custom_layer.h
index 95a6ff4c5c9..cbe41f8831b 100644
--- a/inference-engine/src/cldnn_engine/cldnn_custom_layer.h
+++ b/inference-engine/src/cldnn_engine/cldnn_custom_layer.h
@@ -10,7 +10,7 @@
#include