Commit Graph

130 Commits

Author SHA1 Message Date
Evgenya Stepyreva
1bae540895 [ MO ] KSO=ON for Kaldi (#2028)
* [ MO ] KSO=ON for Kaldi

* [ MO ] Kaldi KSO

* set static_shape for graph cycle making transformation
2020-10-23 13:14:00 +03:00
Anton Chetverikov
44406691e5 Add Round-5 operation (#2328)
* Add Round-5 operation

* Add ONNX Round to supported operation list

* Add ngraph implementation for Round operation

* Update MO part

* Create UnaryElementwise class, update Round Operation

* Fix mode attr in mxnet extractor

* Add tests for Round shape infer

* Update 'enable' attr

* Update MO IR Reader to support UnaryElementwise operations

* Minor test refactor

* Update ngraph Round operation

* Add reference implementation

* Add test for reference implementation

* Add test for shape infer

* Add test for IE IR Reader

* AddRound operation to python api

* Fix missed mode attr

* Update Round operation version

* Fix codestyle

* Add MxNet Round to supported layers list

* Fix error in reference

* Fix comments style

* Update CMake file

* Update Ngraph reference test

* Update IE IR Reader tests

* Return v0::Round operation

* Update shape infer tests

* Fix v0::Round reference

* Fix codestyle

* Enum instead of string

* Fix codestyle

* Add Mode attribute adapter

* Update Mode attr

* Fix reference for v0::Round

* Fix codestyle

* Fix mode attr

* Fix get() method

* Fix codestyle in python api

* Update test info

* Fix ngraph api part

* Ad round v5 to interpreter tests

* Fix codestyle is ie reader test

* Update ngraph python api __init__.py file

* Adde opser5 to dafault opsets in ie_ir reader

* Add parser for Round layer

* Remove redundant spaces

* Add round creator to appropriate list

* Remove redundant import

* Commit to bump infrastructure version

I'm sorry for this, but this commit will be squashed on merge to master anyway and it is needed for your PR to correctly pass the pipeline

* Fix import

* fix codestyle

* Fix ngraph api part

* Add shape infer tests in python api

* Add .upper() for mode attr

* Refactor MO shape infer test for Round op

* Update tests and add comments

* Revert "Commit to bump infrastructure version"

This reverts commit 56e6ae1e4c.

* remove parser for Round layer

* Update Ronund-5 evaluate test

* Resolve review comments

Co-authored-by: User <user@nnlvdp-achetver.inn.intel.com>
Co-authored-by: Andrey Babushkin <andrey.babushkin@intel.com>
Co-authored-by: Anton Chetverikov <anton.chetverikov@.intel.com>
2020-10-20 18:36:19 +03:00
Maxim Vafin
a405546054 Add LogSoftmax-5 to MO and ngraph (#2409)
Co-authored-by: Evgeny Lazarev <evgeny.lazarev@intel.com>
2020-10-20 13:40:06 +03:00
Evgeny Lazarev
d86019d104 Leaky relu transformation refactor (#2640)
* Refactored LeakyRelu transformation

* Added unit test for LeakyRelu transformation + removed duplicate test function valued_const
2020-10-14 16:43:29 +03:00
Pavel Esir
2110a29b7c [MO] [Kaldi] Add TDNN Component (#1870)
* [MO] [Kaldi] Added TDNN Component

* TdnnComponent replacer graphical comment updated

* Added SpecAugmentTimeMaskComponent

* some refactor of memoryoffset shape_infer

* moved memoryoffset splitting to the middle stage

* some corrections
- set `need_shape_inferenc`=False in split_memoryoffset
- use cycle instead of pattern in tdnn_replacer

* separated splitting of MemoryOffsets in LSTM and TDNN blocks

* set transpose_weights=True in TdnnComponent

* Corrected Supported_Frameworks_Layers

* corrected comments

* separate naming for tdnn and lstm memoryoffset splits

* corrected BOM file

* corrected generaldropout_ext.py and removed 'has_default' for tdnn_component

* corrections after PR review

* renamed LSTM -> recurrent; added setting element_size for paired nodes of tdnn_memoffset and othe minor changes

* Update split_tdnn_memoryoffset.py

* corrected partial infer with new API in elemental.py and split_tdnn_memoryoffset.py
2020-10-12 14:10:27 +03:00
Pavel Esir
9a9b231c98 [MO] Fix ONNX Clamp-11 shape infer with no min/max inputs (#2603) 2020-10-12 09:55:45 +03:00
Roman Donchenko
0e502ffb35 [MO] Fix many spelling and grammar errors (#2543) 2020-10-09 12:16:12 +03:00
Pavel Esir
9149d899b3 [MO] Fix: add PermuteInputs to shape broadcasting (#2419)
* fix: add PermuteInputs to shape broadcasting

* fix type declaration typo
2020-10-05 12:48:57 +03:00
Zoe Cayetano
62a33f7f4b Update get_ov_update_message.py (#2499) 2020-10-02 23:19:54 +03:00
Pavel Esir
1c97b13e9a [MO] Add explicit broadcasting mode (#2077)
* [MO] Add explicit broadcasting mode

* corrected value broadcast, added nontrivial test cases

* added negative unit-tests

* added axes normalization and permute inputs

* corrected axes normalization

* Update model-optimizer/mo/utils/broadcasting.py

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2020-09-25 13:26:47 +03:00
Evgenya Stepyreva
cd391389ce [ MO ] Complete weights layout permutation (#2299)
* MO TF: FQPerChannel extractor

* [ MO ] Complete weights layout permutation

* removed deleted file out of BOM

* Bring back stashed changes

* Skip if no weights permutation

* Conditional permutation

* Comments
2020-09-18 14:42:16 +03:00
Svetlana Dolinina
cdedc4af19 added check to avoid IR generation in case of wrong input shape (#2127)
* added check to avoid IR generation in case of wrong input shape

* review changes
2020-09-16 11:29:05 +03:00
Evgenya Stepyreva
1007b05104 [DOC] Reshape feature (#2023)
* [DOC] Reshape feature

* Comments adressed.

* Clarifications

* Converting_Model_General.md

* Update ShapeInference.md

* Update ShapeInference.md

* Comments

* Update Convert_Object_Detection_API_Models.md

Co-authored-by: Andrey Zaytsev <andrey.zaytsev@intel.com>
2020-09-11 21:41:42 +03:00
Roman Kazantsev
82e15a5a64 Support python 3.8 by the Model Optimizer tool in default configuration (#2078)
* Support python 3.8 by the Model Optimizer tool in default configuration

* Fix after review #1

* Fix after the second round review
2020-09-09 08:34:43 +03:00
iliya mironov
9939253fed Refactored legacy code for mean_scale_values transformations (#1936)
* Remove move_to_preproc. Not actual.

* Updated documentation
2020-09-07 10:41:47 +03:00
Maxim Vafin
18a49f9e7e Fix fusing Multiply node with Convolution in case group != 1 (#1882)
* Fix fusing Multiply node with Convolution in case group != 1

* Add transformation test

* Do not fuse if not possible to reshape const

* Update fuse_linear_ops.py
2020-09-04 20:32:51 +03:00
iliya mironov
5a376477a9 Fix version print (#2022)
* Fix version print
2020-09-03 15:39:02 +03:00
Evgeny Lazarev
c7bcbb576c Updated ConcatOptimization to support Concat with 0D input of one dimension (#2012)
* Updated ConcatOptimization transformation to work when one dimension of input to Concat is 0D

* Fixed ConcatOptimization transformation to reconnect input edges to Concat

* Completely re-written ConcatOptimization

* Updated Concat0D optimization transformation

* Fixed order of traversing Concat input ports

* Refactored ConcatOptimization transformation to use `delete_input_port` function

* Detele trailing unconnected ports in the ConcatOptimization.py

* Cleaner implementation of ConcatOptimization + unit test
2020-09-02 10:21:23 +03:00
Pavel Esir
7cd6b353ef [MO] Fix when Crop asks for MXNet specific cmdarg enable_ssd_gluoncv (#1978) 2020-08-31 18:06:13 +03:00
Anton Chetverikov
675e1c821e Update priorbox extenders (#1925) 2020-08-27 13:10:44 +03:00
Evgeny Lazarev
a4d90a0aba MO fusing activations (#1942)
* Added HSwish operation

* Added HSwish fusing transformation

* Fixed BOM

* Added unit test for HSwish fusing transformation

* Fixed unit tests for transformations using 'build_graph_with_edge_attrs' function to build the graph

* Added fusion transformation for Swish operation

* Added fusing transformation for Softplus operation

* Added fusion transformation for Mish operation

* Added check for the node name in the unit tests

* Fixed Mish fusion pattern

* Updated Mish fusion transformation. Added unit test

* Updated HSwish fusing transformation

* Updated Swish fusion transformation and tests

* Fixed unit tests
2020-08-27 11:56:52 +03:00
Evgenya Stepyreva
45070963a5 [MO] Relax Reshape layer hardcode under MatMul (#1921)
* [MO] Relax Reshape layer hardcode under MatMul

* Memory fix
2020-08-27 09:45:08 +03:00
Roman Kazantsev
9d5a6cff70 Enable eager execution while TensorFlow 2 model is loaded (#1945) 2020-08-26 17:16:58 +03:00
Evgenya Stepyreva
c4920ef5a0 [ MO ] Fix for remove_op_node_with_data_node (#1934) 2020-08-25 20:30:41 +03:00
Maxim Vafin
b9f698b456 Fix output name collision for incorrect ONNX models (#1930) 2020-08-25 18:43:43 +03:00
Evgeny Lazarev
aca452def8 Fixed order of transformation to convert the TF OD API SSD models (#1887)
* Fixed order of transformation to convert the TF OD API SSD models

* Refactored the sub-graph modification for the TF OD API models related to Squeeze/Reshape after SSD heads
2020-08-25 16:39:34 +03:00
Roman Kazantsev
76d2a1c351 Disable eager execution affecting TensorFlow 1 concept model handling (#1914)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-08-24 18:01:45 +03:00
Ivan Tikhonov
c74643f6b6 Fix Assign, Matmul ops for correct work with keep_shape_ops feature for Kaldi models (#1885)
* fix assign and matmul ops

* fix unit test

* static shapes by default for kaldi
2020-08-24 14:11:01 +03:00
Evgenya Stepyreva
920bf23718 [ MO ] FloorDiv replacement (#1860)
* [ MO ] FloorDiv replacement

* BOM file

* Review comments

* FloorDiv in SupportedFrameworkList.md
2020-08-20 12:33:44 +03:00
Evgenya Stepyreva
802d605bff [ MO ] KSO ON by default (#1730)
* [ MO ] KSO ON by default.
Introduce static_shape MO key, remove keep_shape_ops key usages

* keep_shape_ops -> static_shape

* static_shape = False by default

* Fix Proposal-4 shape infer

* style-apply

* Fix Layout Change for ShapeOf paths
2020-08-20 12:06:45 +03:00
Anton Chetverikov
4925485c14 ExtractImagePatches MO implementation and nGraph transformation (#739) 2020-08-19 13:23:41 +03:00
Maxim Vafin
6b04eca3c2 Add Range-4 support (#1552)
* Add Range-4 support

* Add type infer and IR Reader extender

* Implement ngraph Range-4

* Implement evaluate for Range-4

* Remove not needed types

* Resolve review feedback

* Add RTTI defines
2020-08-19 07:58:41 +03:00
Maxim Vafin
d52bfb5149 Fix problem with renaming outputs from network (#1546) 2020-08-17 14:38:41 +03:00
Evgeny Lazarev
133baf23ef Updated a link to MO FAQ (#1750) 2020-08-13 13:20:29 +03:00
Evgenya Stepyreva
2d2a6dbfd8 [ MO ] Fixed layout interpretation for 4/5D tensors calculated from ShapeOfs (#1634) 2020-08-11 09:34:04 +03:00
Evgenya Stepyreva
1eac9e3932 [ KALDI ] Disable KSO (#1689) 2020-08-10 12:22:42 +03:00
Pavel Esir
7e82728130 remove TestMode restriction for batchnorm in Kaldi (#1697) 2020-08-10 12:21:53 +03:00
Pavel Esir
75d2d88b61 Reshape able slice (#1241)
* Added Caffe Slice_ext

* Added TFSlice, AttributedSlice (both with extractors and replacers), corrected SliceConverter and added unittests for all cases

* added comments to each type of Slice operation; optimized shape inference; moved mxlice inside of slice.py; renamed slice_replacers

* removed type annotation for get_shape_after_slice routine

* replaced zeros_like with zeros

* Corrected preserving node names, renamed attributes names, added tests fro slice_replacer onnx phase

* Renamed slice_replacers.py

* added more unittest cases

* added type annotations, moved to more relevant place routines for shape calculation, and some other minor corrections

* corrected a typo `normalize_slice_indices` comment

* corrected shape calculation for Nonconstant inputs

* corrected a few typos

* corrected type declarations

* corrected shape inference with rounding

* refactored unit-tests for front transforms of Slice

* added error raising for negative and zero shapes

* removed magic_num

* corrected AttributedSlice, clarified comments

* fixed unit-test for AttributedSliceToSlice

* typo in type hints corrected

* removed supported_attrs

* returned back default None for attrs of Slice
2020-08-10 12:19:08 +03:00
Maxim Vafin
75cb10fd6d Improve node name with port resolving (#1581)
* Improve node name with port resolving

* Fix IE remove Convert on output

* Address feedback
2020-08-05 11:31:17 +03:00
Evgeny Lazarev
dec7df17ed MO clean from IR v7 and other legacy code (#1521)
* Remove unnnecessary ir_version checks in the MO

* Cleaned up 'backend_attrs_v2' function

* Small clean up from the 'TFCustomSubgraphCall'

* Clean up the MO extractor attributes mapping

* Renamed PreluOp to PReLU
2020-07-29 17:43:12 +03:00
Evgeny Lazarev
eb8fe44de3 Updated MO requirements files (#1511)
* Updated MO requirements files

* Updated requirements in the CI config to run the pylint
2020-07-29 13:23:52 +03:00
Maxim Vafin
43b46036ae Fix the case with nodes containing ":" in names (#1089)
* Fix the case with nodes containing : in names

* Raise error in case of several possibilities
2020-07-24 18:39:57 +03:00
Pavel Esir
e56c8a2bc7 support parallel nested nnet for Kaldi (#1194)
* supported nested nnet1 for Kaldi
2020-07-23 15:37:41 +03:00
Anton Chetverikov
cdd5605c61 Update ShapeOf extender (#1406) 2020-07-23 14:07:34 +03:00
Roman Kazantsev
7b65ba365e Implement ScatterND operation in MO and transform for SparseToDense (#584)
SparseToDense used in Wide and Deep model is expressed through ScatterND operation.
ScatterND is more functional than SparseToDense. Hence, it was decided to replace SparseToDense
with ScatterND. ScatterND is more useful for other models.

Remove SparseToDense from the previous opset

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2020-07-10 12:29:15 +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
Anton Chetverikov
5aa9ffbfe3 Fix const node non-deterministic names (part 1) (#996)
* Update node names
2020-06-26 13:41:49 +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