Commit Graph

73 Commits

Author SHA1 Message Date
Anton Chetverikov
56916ace61 Fix const node non-deterministic names (part 2) (#1081)
* Fix non-deterministic node names generation in the Model Optimizer (part 2)
2020-07-07 09:37:48 +03:00
Maxim Vafin
ae8aaedc29 Add assert for Clip-11 (#795) 2020-07-06 18:10:14 +03:00
Evgeny Talanin
02d4787cd4 Stick to isort==4.3.21 (#1223) 2020-07-06 17:49:47 +03:00
Evgenya Stepyreva
20610ce52e [ BTS & STB ] Fixing broken transformations (#874) 2020-07-03 19:55:00 +03:00
Evgenya Stepyreva
143036f96f [ MO ] Clamp value inference (#1207) 2020-07-03 17:57:10 +03:00
Yegor Kruglov
465707eba7 [MO MXNET] Fixed spatial reshape on GluonCV models (#587)
* added value propagation for slice_like op

* Mark slice_lice as undead node

* fixes in mark_undead_nodes and unittests update
2020-06-30 22:32:13 +03:00
Evgeny Lazarev
f596432268 NMS-4 op support (#1115)
* Specification for the NMS-4 operation (updated shape infer function)

* Enabled NMS-4 in the Model Optimizer

* Changed opset version for NMS with dynamic outputs and namespace to be "dynamic"

* Added NMS-4

* Added opset4 to the nGraph

* Added unit tests for NMS-4 type infer

* Renamed UpgradeNMS3ToNMS4 to UpgradeNMS3ToNMSDynamic. Added stub for ConvertNMS4ToLegacy

* Make IE aware of opset4 ops

* Updated NMSIE to have different shape infer function based on the NMS it was converted from. Implemented NMS4->NMSIE conversion

* Apply code style

* Updated StaticShapeNonMaximumSuppression op in the VPU

* Introduced new version of NMSIE operation with shape infer function from v4::NMS

* Fixed dynamicToStaticNonMaxSuppression transformation

* Added new version of NMSIE op with updated shape infer function

* Fixed NMS4 to NMSIE2 transformation

* Fixed constructors for nGraph ops v4::NM and dynamic::NMS

* Updated text in the opset4 specification document

* Code style fixes

* Fixed constructors for StaticShapeNMS + fixed test

* Minor change to the NMS op in the MO

* Fixed typo in the dynamic_to_static_shape_non_max_suppression transformation

* Removed redundant checks

* Refactored NMS infer and validate functions

* Added more checks to the validate_and_infer_types functions for NMS-3 and NMS-4

* Fixed compilation issue on Windows for op NMS

* Code style fixes

* Fixed typos in the NMSIE and NMSIE2 to CNNLayer op conversion

* Fixed typo in the ie_cnn_layer_builder_ngraph.cpp

* Fixed the NMSToLegacyNMS transformation. Added unit tests

* Apply code review comments

* Refactored NMSIE to use visitors

* Removed calling ConvertNMS4ToLegacy in the common optimizations

* Moved NMS4ToNMSLegacy to convert1_to_legacy group of transformations

* Removed useless include statement

* Removed copy-paste issue

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2020-06-30 14:04:31 +03:00
Evgenya Stepyreva
62fba3eadf [ MO ] Keep data type of compressed value (#1143)
JIRA: 34085
2020-06-29 14:56:11 +03:00
Vladimir Gavrilov
b9d67927fd Fixed deleting Transpose layers after and before Interpolate layers. (#1071)
* Fixed deleting Transpose layers after and before Interpolate layers.

* Added run_after() for the transformation InterpolateTranspose.

* Some checks were moved from the replacement function to the pattern.

* Added a check of the attribute 'axes' into the pattern.
2020-06-29 12:49:29 +03:00
Anton Chetverikov
5aa9ffbfe3 Fix const node non-deterministic names (part 1) (#996)
* Update node names
2020-06-26 13:41:49 +03:00
Maxim Shevtsov
7e40136c3c LayerNorm(PyTorch/HuggingFace pattern)->MVN+Mul+Add (#1003)
* LayerNorm(PyTorch/HuggingFace pattern)->MVN+Mul+Add. Improves perf on BERT by 5%

* deducing the across_channels from axes passed to the MVN op.
axes are normalized. if no axes is specified, falling back to the (previously) default across_channel value

Co-authored-by: myshevts <maim.y.shevtsov@intel.com>
2020-06-25 09:25:56 +03:00
Roman Kazantsev
5ad1bf643d Correct removing nodes from graph and add test for ConstToResult transform (#1084)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-06-23 13:49:14 +03:00
Evgenya Stepyreva
f40338ff4b [ MO ] Hard-coded Interpolate followed by concat reshape-ability fixing (#818) 2020-06-23 08:27:27 +03:00
Maxim Vafin
9276334144 Cherry-pick fix OneHot transformation for Bert Squad opset 10 (#1068)
* Fix OneHot transformation for Bert Squad opset 10

* Add transformation for squeezing depth for OneHot
2020-06-22 20:42:02 +03:00
Evgeny Lazarev
970b1301b5 Cleanup IR v7 from the MO (#1008)
* Removed back phase transformations related to IRv7

* Fixed setting value for the input port using the 'set_value' method

* Removed front and middle phase transformations related to IRv7

* Cleanup the rest of the Model Optimizer transformations from IRv7 specific transformations

* Final cleanup of the deprecated IR v7 related code

* Removed 'blobs_as_input' usage in the Model Optimizer.

* Removed function '_fuse_add' from the Model Optimizer since it is not used anymore.

* Removed 'keep_in_IR' node attribute for FakeQuantize ops in the MO

* Disabled failing gpu_engine.user_context test
2020-06-22 11:52:00 +03:00
Evgeny Lazarev
356e40c988 Relaxed MO requirements for "protobuf" package (#864)
Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2020-06-17 18:31:23 +03:00
Pavel Esir
00f0247b4e fixed some typos in MO help (#972) 2020-06-17 18:27:37 +03:00
Maxim Vafin
074266bf73 Fix onnx slice by clipping ends to int32 domain (#603) 2020-06-09 17:50:38 +03:00
Pavel Esir
7a11e36eeb Add fixedscale(bias) components to Kaldi (#725)
* Added fixed scale(bias) components

* Successfully converted after adding fixed bias,scale components

* Added unittests
2020-06-08 21:37:44 +03:00
iliya mironov
eefaf56075 Fix unit tests for select layer. (#638)
* Fix unit tests for select layer.
2020-06-08 18:39:40 +03:00
Maxim Vafin
f1811ad060 Implement support for opset3 EmbeddingBag ops (#546)
* [MO] Implement EmbeddingBag_3

* Transform dynamic sub-graph of Wide and Deep into EmbeddingSegmentsSum

- Expressed SparseWeightedSum sub-graph through EmbeddingSegmentsSum
- Removed experimental SparseWeightedSum layer
- Implemented tests for the transformation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix EmbeddingBag shape infer

* Fix EmbeddingSegmentsSum transformation for Wide and Deep

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix EmbeddingSegmentSum replacer after ports swap

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update package_BOM.txt

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add unit tests for EmbeddingXXX shape infer

* Fix ATen resolver

* Remove deleted files from BOM

* Add opset version to embedding_bag

* Use base class for EmbeddingBag

* Fix per_sample_weights case

* Fix EmbeddingSegmentsSum transformation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix EmbeddingBag checks

* Fix ATen front transformation and merge conflicts

* Fix BOM

* Work around limitation for I64 input of W&D model

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Cleanup where operation to fix affect of WhereDecomposition transform

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix BOM

* Correct EmbeddingSegmentSum transform for Wide and Deep

Add casting segment ids to i32 and remove ConstToResult sub-graph.

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Update BOM with RemoveConstToResult transform

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Add more comments for RemoveConstToResult transformation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Remove useless logging in EmbeddingSegmentsSum transformation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Small fixes

* Move EmbeddingBag resolving back to front phase

* Improve error messages

* Fix typo in unittests

* Reimplement sparse_reshape middle transform

Avoid deprecated API.

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Clean-up graph after sparse_reshape and ConstToResult transformation

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix clean-up for transformations

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Fix clean-up for transformation #2

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-06-08 18:06:40 +03:00
Evgenya Stepyreva
e7f5f53f92 [ MO ] Groupped conv fusion (#797)
Fixed the group convolution fusion pass to properly get the feature dim in NCHW layout case.
2020-06-08 13:00:54 +03:00
Maxim Vafin
f51c533ea8 Add ReduceL2 decomposition (#733)
* Add ReduceL2 decomposition

* Add ReduceL2 transformation tests

* Add const propagation unit test for ReduceL2
2020-06-05 12:34:57 +03:00
Maxim Vafin
c7d130efbe Fix Proposal for the case of 2 outputs (#773) 2020-06-04 20:56:46 +03:00
Maxim Vafin
1001caf04e Add support for ONNX Pad-11 (#744) 2020-06-04 14:48:31 +03:00
Evgenya Stepyreva
01e60d057d [ MO ] InterpolateConcat empty sources fix (#764) 2020-06-04 14:18:33 +03:00
wistal
2bb7010193 MO should support LRN k param with caffe model, rather than fixed to 1 (#716)
Co-authored-by: yipengqu <yipeng.qu@intel.com>
2020-06-03 20:33:55 +03:00
Ilya-Krylov
cfb5f27899 Add 'aligned' param to ExperimentalDetectronROIFeatureExtractor for CPU plugin and MO 2020-06-03 17:52:40 +03:00
iimironov
a79cd75596 Imironov/cvs 31297 add yolov4 support (#594)
* Add transformation of softplus operation into log(1.0 + exp(x)).
2020-06-02 19:20:29 +03:00
Anton Chetverikov
265e3c7cba Remove TopKnormalizer from MO IR Reader transformation_list (#590)
* Remove TopKnormalizer from transformation_list and added call of normalize_outputs to fix read/save of some models
2020-06-02 12:43:41 +03:00
Evgeny Lazarev
278868b7a1 Align MO requirements files (#710) 2020-06-02 11:32:39 +03:00
Roman Kazantsev
004f414b89 Fix SparseWeightedSum transform for Wide and Deep (#698)
WhereDecomposition transform is applied to Where operation in for-garbage sub-graph remained after SparseWeightedSum transform.

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-06-01 11:48:06 +03:00
Vladimir Gavrilov
3a24eb6a62 MO fails generating IR from XLNET model due to a bug in the transformation ConvertGroupedStridedSlice (#625)
* Small fix in the transformation ConvertGroupedStridedSlice. Now VariadicSplit is generated only in the case when node has at least 2 output nodes.

* Added unittests for the case when there is only one StridedSlice.
2020-05-29 21:01:09 +03:00
Artyom Anokhov
09192b804e [OpenVINO scripts] Fixed *.sh files index from 644 to 755 (#664)
* Fixed *.sh files index from 644 to 755

* Added convert.py executable permission
2020-05-29 13:50:17 +03:00
Evgenya Stepyreva
e290b14ab1 [ MO Interpolate ] Fixing broken model reshape-ability (#619) 2020-05-29 09:15:47 +03:00
Evgenya Stepyreva
5cc8114322 [ MO: CVS-32286 ] IdentityN fix (#668) 2020-05-29 09:11:22 +03:00
Andrey Somsikov
5f6999ed7e Remove Safety dependency (#627)
Safety tool should be isolated from the environment it is validating:
https://github.com/pyupio/safety/security/advisories/GHSA-7q25-qrjw-6fg2

Suggesting docker solution by default.
2020-05-28 18:31:10 +03:00
Vladimir Gavrilov
33aca7d2c4 SplitConcatPairToInterpolate inserts Interpolate when input is 2D (#596)
* SplitConcatPairToInterpolate transformation was moved to middle stage and is applied only for 4D and 5D inputs.
2020-05-28 18:08:24 +03:00
Evgeny Lazarev
0efe474342 Fixes for Mask-RCNN conversion (#654)
* Fixed ONNX Mask-RCNN conversion

* Fixed validate_and_infet_types for NMS ops: added check for number of connected inputs

* Updated NMS ops to properly handle optional input with index 2

* Fixed typo in the implementation
2020-05-28 14:31:42 +03:00
Evgenya Stepyreva
ec5c9db932 [ MO ] Memory usage (#657) 2020-05-28 14:00:42 +03:00
Roman Kazantsev
958e425775 Implement Bucketize in MO and MKLDNN for opset3 (#583)
This operation is used for Wide and Deep Model

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-05-28 11:11:07 +03:00
Pavel Esir
e337350cc1 Fix skipping incorrect names in scale/mean values (#535)
* Fix skipping incorrect names in scale/mean values

* removed inappropriate comment in cli_parser.py
2020-05-27 14:53:50 +03:00
Evgenya Stepyreva
5c2eb05990 [ MO ONNX ] Resize-11 clear error message (#620)
* Small refactoring of extractors

* [ MO ] Throwing an exception while extracting Resize-11 which is not supported
2020-05-27 08:09:15 +03:00
Evgenya Stepyreva
73f3b7c8fc [ MO ONNX ] TopK-1/10/11 proper extracting (#600) 2020-05-26 21:53:24 +03:00
Shashwat Dalakoti
4943a954c7 Updated requiremnets.txt (#593)
Alignment with the requirements_tf.txt file
2020-05-26 16:19:43 +03:00
Roman Donchenko
e835a4cf58 MO: Flush after dumping the arguments to stdout (#570)
When stdout is not a terminal, Python will buffer it by default. This
means that a consumer of MO's output will not see the argument information
until the buffer is flushed, which will normally only happen once MO
finishes (which might take a while).

Flushing stdout explicitly allows the consumer to see this info as soon
as it's printed.
2020-05-26 07:44:25 +03:00
Maxim Vafin
8c8629a4af Support ONNX Clamp-11 (#538) 2020-05-25 19:59:07 +03:00
Evgenya Stepyreva
b6a05c232e [ MO TF ] IdentityN support (#529) 2020-05-25 10:52:58 +03:00
Alexander Zhogov
43fdf32729 Fix MO CI job name (#520) 2020-05-23 00:24:05 +03:00
Alexander Zhogov
20c1755efc Update public CI (#514)
* Update public CI

* Add MO test check

* Disable cpuFuncTests on Windows
2020-05-22 23:34:26 +03:00