Commit Graph

122 Commits

Author SHA1 Message Date
Pavel Esir
fb6359586d fix ConvertGroupedStridedSlice.py for XLNet (#10496) 2022-02-18 22:40:28 +03:00
Svetlana Dolinina
d2177cf177 remove old protobuf eggs (#10473) 2022-02-18 18:12:23 +03:00
Roman Kazantsev
20266dd0c3 [MO] Upgrade TensorFlow version dependency due to SNYK hits (#10487)
* [MO] Upgrade TensorFlow version dependency due to SNYK hits

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

* Still use 2.5.0 TensorFlow for Python 3.6 and older

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-18 12:29:58 +03:00
Anton Chetverikov
e444715c8d [MO] Restore inputs order in IR Reader (#10403)
* Restore inputs order in IR Reader

* Add saving of outputs order
2022-02-17 13:07:34 +03:00
Pavel Esir
121d59aa80 [MO] move importlib-metadata into setup.py (#10319)
* handle 'and' marker in requirements

* Revert "handle 'and' marker in requirements"

This reverts commit 952bb949ca.

* moved importlib-metadata from requirements.txt into setup.py
2022-02-15 15:01:27 +03:00
Anastasia Kazantaeva
ccc38d22a8 Upgrade MO message for 2022.1 (#10315) 2022-02-15 13:10:45 +03:00
Bartek Szmelczynski
2b03d5fe66 [MO args][ONNX FE]fix cutting graph with input, output or both (#9698)
* fix cutting graph with input, output or both

* fix collisions

* add regex

* revert changes to regex, fix decond_name_with_port function

* fix collisions

* optimize try_get_node function

* swap bool with enum

* revert accidental import

* optimize the code

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* Update tools/mo/unit_tests/mo/moc_frontend/moc_extractor_test_actual.py

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>

* remove redundant check

* fix wrong nodes returns

* fix decode_with_port_name implementation, add comments

* reduce code duplicates

* remove redundant imports

Co-authored-by: Mikhail Nosov <mikhail.nosov@intel.com>
2022-02-15 10:55:40 +03:00
Anton Chetverikov
84ee38d89e [MO] Move redundant checks in ScatterUpdate operation shape infer (#10306)
* Add extender for ScatterUpdate operation

* Remove scatterupdate extender

* Remove redundant checks in Scatter shape inference function

* Move checks to ScatterElementsUpdate operations

* mava checks to appropriate place
2022-02-15 04:55:38 +03:00
Pavel Esir
d1477b8569 fixed setting 'out_ports_count' in ir_reader (#10265) 2022-02-14 16:01:22 +03:00
Daniil Lyakhov
56be1a5438 Change User Transformations applying order in MO (#10241)
* Fix user transformation order in mo

* Move user transformation behind FP16 compression

* Move user transformation call before fp16 compression
2022-02-14 15:06:09 +03:00
Anastasia Popova
ac2e639ff8 Added telemetry to modules names list. (#10295) 2022-02-13 10:28:17 +03:00
Pavel Esir
653ed4a34c [MO] use revision hashes to compare IE & MO versions (#10230)
* fixed version comparison: for comparsion extracted hashes are used

* shortened 7 -> 11 to match the current version fromat from nightly

* corrected regex, added comparing by minimal hash len
2022-02-12 00:13:48 +03:00
Tomasz Dołbniak
c186449735 Do not process null nodes in JSON analysis (#10269) 2022-02-11 08:42:25 +01:00
Anton Chetverikov
50dffb80bb Add missed DeformableConvolution to back transformations (#10255) 2022-02-10 17:20:11 +03:00
Anton Chetverikov
9af8d9339c [MO] Avoid maskedconstant to array conversion (#10233)
* Avoid maskedconstant to array conversion

* remove redundant input

* Add link to github issue
2022-02-10 16:24:05 +03:00
Tomasz Dołbniak
aedd902cd8 Use double quotes in JSON analysis (#10237) 2022-02-09 20:41:49 +03:00
Pavel Esir
654b025a26 [MO] set explicitly argument dtype to int for np.split (#9988)
* forced split argument dtype to int

* added unit-test

* fixed typo in split_test.py

* set explicitly np.int64 instead of np.int

* use split_length's dtype
2022-02-09 12:16:33 +03:00
Anton Chetverikov
25ca17e789 [MO IR Reader] Update *Sequence backend_attrs (#10041)
* Update LSTMSequence backend_attrs

* Add missed attribute clip

* Update backend_attrs for all *sequence operations

* Add extender for GRUSequence

* Add GRUSequence to custom ops list

* use has_and_set instead if direct acces to attributes
2022-02-09 12:13:23 +03:00
Maxim Vafin
52374a4b8b Write runtime version and how IR was genarated (legacy path or not) (#10196) 2022-02-09 11:41:49 +03:00
Maxim Vafin
1970baeb1c Apply RIC for dynamic dimension in legacy MO (#10130)
* Apply RIC for dynamic dimension in legacy MO and fail if RIC wasn't applied to any input

* Fix moc tests
2022-02-08 22:17:19 +03:00
Anton Chetverikov
f9eaaa9ff6 [MO] Sqrt operation implementation (#9950)
* Add sqrt extender

* Update check to not use default infer in infer was set before

* Update comment

* Fix comment

* Remove Sqrt extender

* Remove unnecessary changes

* Add MO implementation of SQRT operation
2022-02-08 11:41:13 +03:00
Yegor Kruglov
9d3028a9f7 [MO] Pip installation message for not satisfied dependencies (#9952)
* changed message for not satisfied package

* changed warning message
2022-02-07 22:19:02 +03:00
Yegor Kruglov
bde1d5edb0 added condition for optional outputs (#10097) 2022-02-07 18:24:28 +03:00
Pavel Esir
3d6e90b8f9 concat['override_output_shape'] = True in StridedSliceNormalizer.py (#10045) 2022-02-07 13:24:56 +03:00
Mikhail Nosov
9f9df184c4 Added compatibility check of layout with partial shape (#10144)
* Added compatibility check of layout with partial shape

E.g. layout "NC" in not compatible with PartialShape{1,3,224,224}

Check is added:
- For parameter set_layout
- For parameter set_partial_shape
- For result set_layout
- Checked also compatibility for all results after 'validate_and_infer_types'

* Fix incorrect tests

* Fix of more incorrect tests

* Removed couple of obsoleted error-handling tests - these are catched now on earlier stages

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2022-02-07 11:17:28 +03:00
Anastasia Popova
12a310636d Fixed input cut for case when port is not specified. (#10134) 2022-02-04 19:03:12 +03:00
Roman Kazantsev
64aabc74d1 Check the selected frontend to correspond use_new/legacy_frontend options (#10084)
* Check the selected frontend to correspond use_new/legacy_frontend options

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

* Fix a default case when no frontend is found

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-03 20:34:07 +03:00
Ilya Lavrenov
f2f281e60b Renamed ov_runtime => openvino, ov_ => openvino_ prefix (#10069)
* Renamed ov_runtime => openvino, ov_ => openvino_ prefix

* Coverage fix

* More fixes

* Fixed MO tests with custom FE
2022-02-03 20:03:41 +03:00
Anastasia Popova
86faa25724 Fix of output tensor names for mask-rcnn* models (#10042)
* Added op names to tensor names for MaskRCNN replacement transformation. Fixed output layout for MaskRCNN.

* Applied commentes left from PR with tensor names fix.

* Added tests for remove_tensor_names().

* Added checks in emitter.

* Removed debug output.

* Small fix.

* Small fix.
2022-02-03 19:44:47 +03:00
Anastasia Popova
ca45bf430a Fixed tensor names set in InputCut and AutomlEfficientDet transformation. (#9998)
* Fixed tensor names setting in InputCut, fixed tensor names losing in AutomlEfficientDet.

* Changed op name adding to tensor names in InputCut for output port case only.
2022-02-03 15:55:16 +03:00
Svetlana Dolinina
5e8f997262 Fix bug in AddReshapeTransposeAroundConvPool for Kaldi LSTM networks (#9885)
* change order of transformations to work correctly with Convolutions in Kaldi LSTM networks

* removed unneeded changes and add unit tests

* remove comment

* remove changes from memory_offset_adjustment, move all fixes inside add_reshape_transpose_around_conv_pool to avoid new bugs

* removed test for deleted changes

* replace -1 by None
2022-02-01 17:06:49 +03:00
Pavel Esir
9bb7697b2f [MO] fix simplified MO import for PyCharm Debug (#9866)
* fix simplified MO import for PyCharm Debug

* package_BOM update
2022-02-01 13:14:48 +03:00
Roman Kazantsev
298cced3b3 [MO, TF frontend] Correct loaders for StridedSlice and Pack operations (#10034)
* Correct Loaders for TensorFlow StridedSlice and Pack operations

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

* Supress INFO and WARNING messages from TensorFlow

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-02-01 11:02:28 +03:00
Pavel Esir
73e9eb4c61 [MO] add reinterp_shape for StridedSlice (#9622)
* added reinterp_shape for StridedSlice

* package_BOM update

* corrected unit-tests

* returned removed tests
2022-01-31 22:17:15 +03:00
Anton Chetverikov
97a78d0059 [MO] EmptyTensorList transform (#9361)
* Initial change for new transformations

* Update patterns

* Update unsupported operation replacement

* Add input/output normalization passes call

* Update logic

* Refactor output concatination transform

* Update re_numerate_input_ports and shape infer functions for Loop

* Update comments

* Add back edge removing to output concatenation transformations

* Update comment

* Remove redundant normallization call

* Update supported layers list

* Use routine in check

* Add transformation to rub_before list
2022-01-28 20:53:16 +03:00
Anastasia Popova
a61655040f Fixed loader for TF2. (#9962) 2022-01-28 13:23:22 +03:00
Nikolay Tyukaev
622027bee5 fix errors in documentation (#9384)
* add sphinx log parsing

* fix

* fix log

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* fixes

* doxygen-xfail

* fixes

* fixes

* fixes

* fixe

* fixes

* fixes

* fix pot

* add pot check

* fixes

* fixes

* Fixed POT docs

* Fixed POT docs

* Fixes

* change heading markup

* fixes

Co-authored-by: azaytsev <andrey.zaytsev@intel.com>
2022-01-27 19:39:49 +03:00
Anton Chetverikov
05684b7cd0 Move tensor name restoring transformation after output normalization (#9904) 2022-01-27 17:41:58 +03:00
Ilya Naumov
1be838576c Fix UnicodeEncodeError on Python 3.6 (#9285) 2022-01-27 14:00:38 +03:00
Yegor Kruglov
bc70b2b68b [ MO ] Support MXNet operation arange_like (#8939)
* arange_like_op

* added comments

* added unittests

* added step attr, changed axis condition, updated tests

* added op description

* fix nodes renaming

* sorted imports

* added case with repeat > 1

* finished arange_like, removed unit test

* small fix in gather infer function

* gather fix

* fix doc

* added unittests

* correct renames

* removed ConvertLike from div_sqrt_dim

* used ReduceProd instead reshape-shapeof

* added keep_dims attr to reduce_prod node
2022-01-27 12:44:12 +03:00
Roman Kazantsev
7ec1cc919e [MO] Correct preprocessing block for TensorFlow OD 2.4+ models (#9944)
* Detect casting node inside preprocessing block and leave it

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

* Fix unit-test for ObjectDetectionAPI

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2022-01-27 12:15:30 +03:00
Anastasia Popova
84f2e9fc24 Parameter/Result tensor names fix (#9754)
* Added tensor names checking transformation. Added framework name saving to tensor names list for input/output cut.

* Small fixes.

* Fixed tensor propagation in PowerToEltwises.

* Corrected tensor checking.

* Corrected tensor checking.

* Fixed MemoryOffsetAdjustment().

* Fixed tensor propagation for Yolo, ONNXMaskRCNNTransformation().

* Small fix.

* DetectionOutput tensor name set.

* Tensor name set for Reshape node in OD API.

* Temporarily added set of tensor names in ConvertGroupedStridedSlice.

* Small corrections, added tests.

* Added checks.

* Added deafault names setting.

* Moved default names setting to single place.

* Added port normilize befor setting tensor names.

* Fixed ResultRename logic.

* Removed tensor setting of unset ports.

* Corrected input cut tensor naming.

* Corrected InputCut, renamed set_tensor_names()->add_tensor_names().

* Fixed tensor setting for InputCut.

* Code corrections.
2022-01-26 17:23:46 +03:00
Milana Shhanukova
d81d7f15a1 do not change shape for scalars (#9751) 2022-01-25 19:37:34 +03:00
Eugeny Volosenkov
b57f1b0fb3 Delete check on port id in InputCut (#9796)
* delete refer_to_faq_msg(31)

* fix documentation

* fix documentation
2022-01-25 17:41:08 +03:00
Eugeny Volosenkov
439e3b26aa Model Optimizer incorrectly convert per-channel Quantize/Dequantize operatros to FakeQuantize (#8321)
* add q_dq_resolver

* prepare FQ for offline transfornations

* fix quantize_dequantize_linear_resolver.py

* fix tools/mo/openvino/tools/mo/middle/dequantize_linear_resolver.py

* enable compress_quantized_weights.py

* fix sub case

* delete force_clean_up

* add isolated attribute

* add test for quantize_dequantize_linear_resolver

* fix comments

* apply comments

* aplying comments

* applying comments

* applying comments

* Replace q_dq_resolver using pattern

* clean imports

* fix imports

* fix pattern

* delete refernce to unit tests
2022-01-25 15:35:43 +03:00
Anton Chetverikov
88903ee7ae Remove incorrect layout changing (#9764) 2022-01-25 14:10:06 +03:00
Pavel Esir
41d4fcdf25 [MO] Add reverse_infer (input rank deducing) for set of operations (#8928)
* grouped convolution resolver fix

* add reverse_infer for Transpose, Elementwise, Identity and some fixes to successfully OOB convert MXNet models

* add reverse_infer for BatchNorms, dynamic groups fix, multi_box_prior.py fix

* add reverse infer for trivial cases

* input rank setting for image detection ops

* reverse_infer for Gather, AttributedGather add todo comment for Parameter

* reverse infer for LSTM, swapaxis; fixes and unit-tests for Elementwise, Gather, Transpose; also generalized Parameter reverse_infer; fixed DetectionOutput and partial reverse_infer

* clarified comment for LSTM reverse_infer

* detalized Elementwise reverse_infer, added several more unit-tests, Split reverse_infer fix, IteratorGetNext_ext.py fix

* generalized group convolution resolver

* specified in_ports explicitly

* clarified Split, Concat, Parameter, other minor typos

* relaxed compatibility check for elementwise; simplified scalar extracting for convolution.py and gather.py, fixed replacer order for ConvolutionNormalizer.py

* added routine set_input_shapes for image detection ops

* fixed typos to pass locally E2E, slightly changed LSTM reverse_infer

* VariadicSplit reverse_infer bugfix

* IteratorGetNextCut.py added check if port is connected

* explicitly specified in_port, added asserts, improved Split reverse infer

* sorted imports

* reverse_infer for ONNX and MXNet LSTM, GRU, RNN operations

* replaced Error raising with red warning

* added missing return for defined input shapes, fixed getting num groups for tf conv

* added mandatory attributes; fixed failing unit-tests, fixed typo with scalar group in ConvolutionNormalizer

* removed priorbox reverse_infer; Parameter reverse_infer corrected to use the only one existing out_port

* fixed clarify_partial_shape_test
2022-01-25 10:14:41 +03:00
Anastasia Popova
d27bbb4bdd Preserve inputs and outputs order for TensorFlow 2 and MXNet models (#9683)
* Preserve outputs order TF.

* Preserve of input/output indices for MxNet.

* Small fix.

* Added check.

* Small fix.

* Corrected Keras model importing.

* Fixed Keras model loading.

* Small correction.

* Corrected model loading.

* Small fix.

* Comment corrected.

* Removed unnecessary import.
2022-01-25 10:13:05 +03:00
Anastasia Popova
ce533fc287 Preserve input/output order for ONNX. (#9352)
* Preserving of input/output indices for ONNX.

* Fixed checks.

* Fixed for case of multiple outputs of node before Result.

* Added test for multiple tensor names before Result.

* Multiple tensor names before Result  fix.

* Added order alignment for user input/output.

* Extended for case of input names in Parameter tensor list.

* Fixed unit tests.

* Corrected help.

* Small correction.

* Code refactoring.

* Temporarily reverted refactor.

* Fixed wrong changes.

* Fixed wrong changes.

* Returned reverted refactoring.

* Removed inputs_list from serializing.
2022-01-24 15:50:28 +03:00
Svetlana Dolinina
b9293dc424 changed Exit op infer function implementation: re-write in new API to avoid unmasking of shapes (#9664) 2022-01-24 12:12:02 +03:00