Commit Graph

292 Commits

Author SHA1 Message Date
Dmitry Kurtaev
a2a7320d74 [MO] Fix EfficientDet conversion (#5029) 2021-03-30 12:28:18 +03:00
Mikhail Ryzhov
d314a7c350 Added version.txt to MO wheel (#4982) 2021-03-30 10:46:35 +03:00
Alexey Suhov
a2bf62f488 Align copyright notice in sh, bat, cl, cc, pyx source files (#4995) 2021-03-27 01:26:27 +03:00
Alexey Suhov
6478f1742a Align copyright notice in python scripts (CVS-51320) (#4974)
* Align copyright notice in python scripts (CVS-51320)
2021-03-26 17:54:28 +03:00
Maxim Vafin
851e203f72 Speed up determined_sort which speeds up emitting the IR (#4928) 2021-03-26 12:50:57 +03:00
Roman Kazantsev
61102d63cc Support DIEN CTR model by the MO tool (#4808)
* [MO] Split iteration node for TensorIterator in case multiple consumers

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

* Implement additional BackEdgeTensorIterator and NonConstBeginStridedSlice transformations

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

* Finalize implementation of DIEN support by the MO tool

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

* Add unit test for NonConstBeginStridedSliceReplacement transformation

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

* Fix retrieving shrink_axis_mask attribute value

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

* Address the majority of review feedback

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-03-26 11:52:36 +03:00
Evgenya Stepyreva
2e75aafbe2 INT4 compression (#4912)
* INT4 compression

* packing tests

* (U)INT4 IR Reader enabling

* Cast test header added

* Fix graph.clean_up

* Review discussions addressed: comments clarification, variable naming, fuller test coverage
2021-03-26 01:06:44 +03:00
Evgeny Lazarev
522ad39a48 Tf 2.0 od api models with loop (#4772)
* Do not run transformations for TF 2.X OD API models recursively (needed for models with Loop operation)

* Added anchor front transformation to group all TF OD API transformations. Added new necessary dependencies from KerasRNN transformations related to While support

* Added JSON configuration files for TF 2.4 OD API SSD and EfficientDet models

* Updated documentation with table of supported TF 2.x OD API models

* Improved visualization of the dependency graph

* Updated version of the pre-processing transformation for TF 2.4 OD API models

* Fixes in the TF 2.x OD API models conversion

* Fixed order of applying mean/scale values for TF 2.X OD API pre-processing

* Updates to the documentation

* Fixes for the preprocessor block transformation for the TF OD API models

* Added code comments

* Fixed bom file

* Unit tests for the TF 2.4 OD API ObjectDetectionAPIPreprocessor2Replacement transformation

* Code cleanup

* Updates to the documentation on how to convert TF OD API models and graph dumper

* Added assert to make sure that operations in the `get_specific_ops_with_const_inputs` has exactly 2 inputs
2021-03-25 17:56:35 +03:00
Maxim Vafin
2a52747b03 Fix reading FP16 scalars from TensorFlow (#4935) 2021-03-25 15:59:02 +03:00
Maxim Vafin
d40a607ca0 Support Pad-2 in opset-11 ONNX model (#4886)
* Support Pad-2 in opset-11 ONNX model

* Add unit test for pad

* Apply review feedback
2021-03-25 12:05:28 +03:00
Evgeny Lazarev
062bfd88d3 Fix Gelu parameter name (#4895)
* Rename attribute of the "Gelu" operation from "approximation" to "approximation_mode"

* Updated MO file for coverage check
2021-03-22 19:35:32 +03:00
Yegor Kruglov
244af264e6 Add remove_value_output attribute to onnx ArgMax extractor (#4831)
* add remove_value_output to onnx argmax extractor

* update TopK extender

* update copyright

* change condition in topk extender based on connection logic
2021-03-22 14:19:27 +03:00
Evgeny Lazarev
64e96fbd9a Fixed dead lock in the telemetry sender (#4883) 2021-03-19 15:12:27 +03:00
iliya mironov
5bb8571980 Add ScatterElements value propagation (#4724)
* Add ScatterElements value propogation

* Add condition for input nodes

* Add asserts

* Refactoring scatter according to review

* Add unit tests for 1d axis tensor

* Refactoring according to review

* refactoring unit test

* Refactoring according to review

* Update unit test

* Update unit test
2021-03-18 16:55:35 +03:00
Ilya Lavrenov
25c2fea2f9 Build python wheel w/o strict dependency to _pyngraph (#4837)
* Build python wheel w/o strict dependency to _pyngraph

* Exclude extra components which are not needed for IE python wheel

- myriad_compile
- myriad_perfcheck
- compile_tool
- inference_engine_c
2021-03-18 11:00:14 +03:00
Vladimir Gavrilov
24c31fba6a Fixed bug in the MO transformation UnsqueezeTileReshapeBlockToInterpolate (#4710)
* Some additional checks in the MO transformation UnsqueezeTileReshapeBlockToInterpolate.

* Refactored transformation UnsqueezeTileReshapeBlockToInterpolate: checks of applicabilty were moved into the separate function.

* Rewritten the MO transformation UnsqueezeTileReshapeBlockToInterpolate.

* Now we replace all block Unsqueeze+Tile+Reshape by Interpolate-4.

* Fixed comment.

* Added comments about applicability criteria.

* Some fixes.

* Small fix.

* Deleted redundant type casts.

* Added an example into comment.

* Now an interpolated axis length is calculated using the function node_to_get_shape_value_of_indices.

* Fixed tests.

* Optimized imports.
2021-03-17 21:56:25 +03:00
Evgenya Stepyreva
f3abba3685 [ MO ] Put FQ fuses under the disable_fusing key (#4829) 2021-03-17 08:51:40 +03:00
Anastasia Popova
7111aff4a9 Fix of tensor names propagation in loops and in add_opoutput(). (#4565)
* Added tensor names propagation in loops and add_opoutput.

* Removed wrong changes.

* Fixed result rename test.

* Stage names fixed.

* Added tensor names propagation to outputs for caffe, tensorflow.

* Added tensor names propagation to outputs for kaldi.

* Fixed bugs.

* Bug fixed.

* Added fake outputs removal.

* Fixed bug.

* Added removal attr to fake outputs in kaldi, caffe.

* Fixed bug.

* Port indices fixed.

* Fixed fake outputs removal.

* Added get_attribute_between_nodes, set_attribute_between_nodes methods, fixed fake output removal.

* More comments added.

* Removed unnecessary stage sets in tests.

* Removed unnecessary output check.

* Revert wrong change.

* New line at the end of file.

* Output cut test.

* Output cut test added.

* Output cut test.

* Added unit tests, comments. Code refactoring.

* Removed unnecessary soft_get.

* Fixed bug in output_cut, code refactoring.

* Code refactoring.

* Added comments.

* Fixed bug in while loop.

* Corrected comments, code refactoring.

* Comments edited, code refactoring.

* Code refactoring.
2021-03-16 16:00:56 +03:00
Evgeny Lazarev
56a179c6a3 Added support for attribute 'pad_to_max_dimension' for TF OD API models (#4720)
* Added support for attribute 'pad_to_max_dimension' for TF OD API models

* Restored line removed by mistake
2021-03-11 13:21:20 +03:00
Mikhail Ryzhov
98dbab27a4 Added mo.py to wheel packages (#4723) 2021-03-11 11:10:45 +03:00
John Gibson
3330ef3da3 Change is to == to avoid warning (#4683) 2021-03-10 10:03:55 +03:00
Evgeny Lazarev
99f94ca09c Adding v7::Gelu operation (#4497)
* Added support for Gelu-6 to the MO

* Adding Gelu-6 to ngraph and python API + some tests

* Fixed typo in the Gelu approximation mode

* Fixed Gelu-6 reference implementation for Tanh mode

* Added transformation to downgrade v6::Gelu to v2::Gelu

* Added specification for the Gelu-6

* Code style fixes

* The Gelu-6 operation specification update

* Fixed compilation issue in reference implementation for Gelu

* Fix compilation issues for some OSs

* Code style fix

* One more cpplint issue fix

* Fixed Gelu6 reference implementation compilation on Windows.

* Code style fix

* Fixed various ngraph unit tests

* Code style check

* Reverted Gelu-2 to be fused op

* Fixed Gelu6 downgrade transformation

* Added unit test for Gelu6Downgrade transformation

* Update copyright year

* Updated copyright year

* Replaced tab characters with 4 spaces in IR reader tests

* Code style fixes

* Added default value for GeluApproximation mode for Gelu-6 op

* Fixed code style for Gelu-6

* Changed order of parameters for the Gelu evaluate to potentially avoid backward compatibility issues with ARM plugin

* Fixed code style

* Introduced opset7. Moved Gelu6 to opset7

* Fixed non-updated transformation

* Fixed opset version in ngraph Python API for Gelu operation

* Fixed typo in the opset number in the documentation

* Reverted some changes related to Gelu6

* Updated MO to produce Gelu7

* Updated unit tests for Gelu

* Updated Gelu7 specification

* Changed gelu reference implementation. Added opset7 to Python packages

* Updated Python API tests for Gelu operation

* Code style fix

* Marked get_approximation_mode function as const

* Added missing "const" qualifier

* Fixed code style issues in tests

* Added extractor for MxNet operation Gelu

* Spelling issues fix

* Updated MxNet supported symbols

* Added NGRAPH_OP_SCOPE for Gelu7 validate_and_infer_types

* Fixed a typo in the comment
2021-03-09 22:45:45 +03:00
Anastasia Popova
5f12213a33 Fixed bug in AssignElimination. (#4609)
* Fixed bug in AssignElimination.

* Removed out edges check from assign elimination.

* Moved Assert to AssignElimination transformation.

* Renamed transformation, added comment.
2021-03-09 14:58:25 +03:00
Yegor Kruglov
84cd802ca5 Fix incorrect edge removal in the disconnect() method (#4582)
* added condition to disconnect method

* add unittest, rewrite the fix

* revert the second implementation, update test

Co-authored-by: yegor.kruglov <ykruglov@nnlvdp-mkaglins.inn.intel.com>
2021-03-05 21:57:28 +03:00
Roman Kazantsev
3dd5bfcfdd Add workaround for control edges to support TF 2.4 RNN (#4633)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-03-05 16:41:31 +03:00
Evgeny Lazarev
699c63bdaf Updated copyright year in all MO files (#4630) 2021-03-05 11:57:42 +03:00
Evgeny Lazarev
7c5c708205 Fixed transformation to pull constants into Loop body (#4591)
* Fixed transformation to pull constants into Loop body

* Improved check that the value for Parameter node is not changed during iterations if the back edge exist

* Added unit tests for common_bfs function

* Stilistic changes

* Fixed typo

* Moved a check into the parameter_unchanged_after_iteration function
2021-03-04 22:00:22 +03:00
Pavel Esir
29612f15e3 Fix StridedSlice replacer order and input permutation when strides are not specified (#4545) 2021-03-03 11:16:56 +03:00
Anastasia Popova
9f5fad16e7 Added check that new name is unique. (#4516)
* Added check that new name is unique..

* Added unique names test.

* Fixed unique name check.

* Fixed bug.

* Reformat code.

* Fixed bug, extended tests.

* Uncomment tests.
2021-03-02 17:26:55 +03:00
Evgeny Lazarev
f88638006c Reverted changes in the Pad transformations caused a regression in the POT (#4552) 2021-03-02 16:00:11 +03:00
Svetlana Dolinina
42c1c65454 fix calculation of memoryoffset shape (#4533)
* fix calculation of memoryoffset shape in 2 cases: after normalization layer (shape can be read from InputDim in loader) and after affincecomponent layer (shape saved in out-size based on weights shape)

* improve comments
2021-03-02 14:35:22 +03:00
Vladimir Gavrilov
473c944e6e Failed MO shape infer after SplitConcatPairToInterpolate transformation, when Concat has more than one producer (#4502)
* Fixes in the MO transformation SplitConcatPairToInterpolate.

* Small fix.

* Small fix.

* Added test for the case when inputs of Concat are two Splits.

* Added docstring to the function get_concat_after_split.

* Some fixes.

* Small fix.
2021-03-02 14:09:42 +03:00
Anton Chetverikov
7770701fe8 Update pooling extender for 3D cases (#4504)
* Update pooling extender for 3d cases

* Update error message
2021-03-01 18:54:47 +03:00
Anton Chetverikov
96875ef411 Revert non-forward-compatible changes for PriorBox & PriorBoxClustered operations (#4501)
* Add conversion from bool to int

* Update specification

* fix codestyle

* Fix conversion error

* Resolve review comments
2021-03-01 13:50:33 +03:00
Gleb Kazantaev
1bdccb41df Telemetry for IE dependency warnings (#4431)
* Initial telemetry for IE dependency warnings

* Unified MO/IE version extraction; updated telemetry messages to use simplified versions

* Update telemetry

* Renamings; improvements; comments

* Turn On telemetry

* Added tests

* Added versions_mismatch flag

* plarform -> system
2021-03-01 13:30:40 +03:00
Evgeny Lazarev
e065cf554a Fixed L2NormFusing transformation (#4526)
* Fixed L2NormFusing transformastion

* Refactor L2NormFusing transformation
2021-03-01 12:13:25 +03:00
Evgeny Lazarev
62fb80aa43 Fixed conversion of the TF OD API 2.0 SSD models (#4529) 2021-03-01 11:42:41 +03:00
Vladimir Gavrilov
b15a70caf7 Corrections in MO to fix performance drop in Interpolate-4 when mode=linear instead of linear_onnx (#4488)
* Written the transformation that replaces 'linear' mode of Interpolate-4 by 'linear_onnx' mode, when the input tensor rank is equal to 4.

* Fixed BOM-file.

* Fixed copyright year.

* Added message into assert.

* Small fix.
2021-02-27 08:49:47 +03:00
Svetlana Dolinina
a1ef9498a3 fix unintended shape change (#4510) 2021-02-26 18:29:29 +03:00
Yegor Kruglov
f7b6ad710f update output ports count depending on opset version (#4439) 2021-02-26 09:18:03 +03:00
iliya mironov
799f34238e Imironov/fix ctc greedy decoder pattern matcher (#4441)
* Fix puttern matcher condition

* Refactoring pattern matcher

* Update unit tests
2021-02-25 09:42:43 +03:00
Pavel Esir
162bdde251 [MO][TF] Fixed TFSliceToSlice conversion error on Win (#4367)
* [MO][TF] Fixed TFSliceToSlice conversion error on Win, replaced int32_max with ShapeOf, minor correction in comments

* review apply: added create_op_with_const_inputs

* review apply: renamed variables, updated typehints for int64_array, float_array, float32_array

* renamed to correct_ends

* returned back check_op_attrs=True
2021-02-24 16:34:43 +03:00
Evgeny Lazarev
5fa1e2140e Temporary disable telemetry (#4449) 2021-02-24 13:27:10 +03:00
Svetlana Dolinina
5ee00a989f add string constants '0'/'1' to bool normalizer (#4402)
* add string constants '0'/'1' to bool normalizer

* fix bug
2021-02-24 13:17:32 +03:00
Evgeny Lazarev
7420bb6cb0 Fix pad op with int input (#4438)
* Added operation ConvertLike to the MO

* Fixed transformations with Pad which insert Const with pad value of incorrect type

* Added constant folding to ConvertLike operation

* Fixed unit tests for Pad transformations to include ConverLike operations

* Update copyright year

* nGraph code style fix

* Added OV_ITT_SCOPED_TASK for ConvertLike constant folding
2021-02-24 09:56:36 +03:00
Maxim Vafin
bf6b061709 Fix MVN in MO (#4311)
* Fix MVN in MO

* Apply feedback and add test

* Remove unneeded import

* Apply review feedback

* Apply review feedback

* Fix issue with class name
2021-02-20 11:11:51 +03:00
Yegor Kruglov
7e3289cc58 added condition for removing input ports (#4396) 2021-02-20 10:26:37 +03:00
Anton Chetverikov
8c79d4134f Update Convert extender (#4409)
* Update Convert extender

* Update copyright year
2021-02-19 20:50:46 +03:00
Gleb Kazantaev
5d647e6fab Add IE Python Dependency To MO (#4151)
* Added script that check IE existance

* Updated install_prerequisites.sh to check and insall IE python dependency

* Execute MOC transformation pipeline in subprocess

* Updated path to offline_transformations.py

* Updated IE dependency search; added libs search support

* Updated install_prerequisites.bat to check IE dependency

* Print warning if MO and IE versions do not match

* Set env before subprocess run

* Add mean and meta info to serialized IR

* Fix pylin import issue

* Update BOM file; added intel headers

* use default serialization; code style fix

* Codestyle

* Added subprocess timeout

* Check e2e status

* Update install_prerequisites.sh logic

* Update MO version to be generated even without cmake execution

* Update install_prereq to extract release version from python

* Simplify pyhton code

* Reduce memory consumtion to its original value

* Added OV find and search logic for windows batch script

* Remove model reading to avoid excess memory consumtption

* IMproved logging messages; simplified code

* Improved warnign message incase when MO and IE versions mismatch

* Fix test import

* Check IE bindings in the beginnig of MO pipeline

* Changed warning message; added RelWithDebInfo path

* Recomendation to build IE from source

* Resolve PR comments

* Apply review comments; Added CheckAPI pass

* Added path to IE local libs

* ModelOptimizer -> Model Optimizer (+IE)

* OpenVINO -> OpenVINO (TM) Toolkit

* Updated install_prerequisites.bat with new logic

* Move offline_transformations.py to back folder; improve warning mesages experience

* Update install_prerequisites.bat

* Move back some unnecessary changes

* Fix BOM

* Disable import errors for pylint

* Fixed grammar in messages

* pylint disable import error

* Final grammar fixes in bat and sh files
2021-02-19 14:13:20 +03:00
Pavel Esir
7dca134031 [MO] [TF] Added TF broadcast_to extractor (#4376)
* Added TF broadcast_to extractor

* updated Supported_Frameworks_Layers.md

* corrected name

* corrected op name in Supported_Frameworks_Layers.md

* added a space after BroadcastTo in Supported_Frameworks_Layers.md
2021-02-19 11:44:11 +03:00