Commit Graph

41 Commits

Author SHA1 Message Date
Anton Chetverikov
8a31e8aafb Provide keep_output_port attribute to add_opoutput function (#6117)
* Implement way to provide keep_output_port attribute to add_opoutput function

* Update tests

* Update comment

* Fake commit to pictures merge problem

* Change default value

* Add type

* Revert "Fake commit to pictures merge problem"

This reverts commit 41850765e0.
2021-07-05 12:34:44 +05:00
Anastasia Popova
a9230a916b LSTMCell tensor names fix (#5696)
* Added handling of debug information in create_node().

* Code refactoring.

* Checks fixed.

* Added comments, added unit test.

* Renamed unit test class.

* Fixed port number in unit test.
2021-05-27 15:13:44 +03:00
Anastasia Popova
04de4e34bc Additional telemetry events in MO. (#5662)
* Added additional telemetry events.

* Separated sending tf1 and tf2.

* Small correction.

* Unit test fix.

* Added op_names_statistic field in graph. Added op names saving in loop ext, while ext.

* Optimize imports.

* Added debug print.

* Added comments, removed debug print.

* Added comment.

* Renamed dynamic shapes event label to partially defined, added unit tests.

* Added attribute checks, moved telemetry methods to separate file.

* Small corrections.

* Updated BOM file.
2021-05-24 15:21:29 +03:00
Roman Kazantsev
d98e954f5d Make order of port names determined in IR (#5701)
* Make order of port names determined in IR

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

* Make port names in determined order and adopted tests

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-05-20 13:44:06 +03:00
Anastasia Popova
07214d0a47 Changed "out_port_id" attribute setting in mapping file to store tensor names. (#5344)
* Removed port id from fw_tensor_debug_info attribute.

* Added port number to tensor names in kaldi, mxnet. Fixed Const naming.

* Sort imports.
2021-04-29 14:05:35 +03:00
Evgeny Lazarev
f3d1aa6490 Moved MO unit test files to a separate directory (#5312)
* Removed test-generator from all MO requirement files except the dev one

* Moved all MO unit tests files to a separate directory

* Added __init__.py files to the tests directory. Fixed importing paths for some unit tests

* Fixed imports in all unit tests. Moved all unit test related files from the MO code to the dedicated directory

* Renamed directory with unit test utils

* Updated imports in unit tests
2021-04-20 14:47:18 +03:00
Anastasia Popova
cadff031d5 Fixed framework name attribute in mapping file. (#5046)
* Fixed framework name attribute for onnx, mxnet.

* Fixed framework name attribute for caffe.

* Removed unnecessary attribute setting from add_opoutput()

* Added identity nodes adding to outputs in mxnet loader.

* Removed unnecessary reformat.

* Removed unnecessary reformat.

* Added check for empty name.

* Used nodes indices instead of node names in loader.

* Code refactoring, small bug fixed.
2021-04-08 20:59:44 +03:00
Yegor Kruglov
ca889f530d [ MO ] Warnings fix (#5105)
* warnings fix

* remove redundant backslash

* add whitespace in the error message
2021-04-08 14:09:00 +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
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
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
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
Evgeny Lazarev
699c63bdaf Updated copyright year in all MO files (#4630) 2021-03-05 11:57:42 +03:00
Pavel Esir
22169a05b9 [MO] StridedSlice improvements (#4139)
* fix ss

* successfully converted

* successfully run moved infer and normalizer unit-tests

* successfully rewritten StridedSlice infer unittests

* int64 array

* Successfully converter crash-when-loading, xj_feauture and toy nets (cherry-picked maxpoolV4 and tf_broadcast_ext)

* successfully moved PermuteAttrs to general mechanism

* successfully converted xj_feauture and crash when loading with the new rewritten SS infer

* fixed get_shape_from_slice and moved to common utils

* fixed extending masks and some other

* some refactoring

* fixed extending masks in extractor, fixed licence year and some other code clearing

* corrected a couple of unittests

* fox permute for 5 rank slice and 4 rank inputs/

* WIP

* Added comments

* fixed StridedSlice in ProposalMutation.py

* rechecked shape_infer unittests added some new cases

* added shape_infer unit-tests after StridedSliceNormalizer pass and Permute unit-tests

* corrected unittests

* Applied review comments

* general permutations for inputs implemented, corrected ellipsis unrolling when shrink_axis is at the beginning, some other corrections

* removed code duplication in infer and normalizer, moved 'slices' attr normalizing to StridedSliceNormalizer.py

* removed some code duplication and other minor improvements

* Added tests

* minor corrections

* wider range of unittests added (froze the number)

* review comments applied

* enabled skipped unit-test

* comment corrections

* applied review comments: changed op -> type, added some asserts, corrected comments and other minor corrections

* sorted inputs, updated Supported_Frameworks_Layers.md, some minor
2021-02-16 11:48:49 +03:00
Anastasia Popova
eeb7835128 Result rename operation (#4242)
* Added result rename operation

* Optimize imports

* Added ResultRename to package_BOM

* ResultRename moved to the end of back phase, code refactoring

* Revert incorrect changes

* Optimize imports

* Added comments and optimized imports.
2021-02-12 22:44:21 +03:00
Roman Kazantsev
636f5c44b0 [MO] Support TF2 Keras ConvLSTM2D operation (#4197)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-02-09 10:11:38 +03:00
Anastasia Popova
cfc3b563a5 Tensor names in IR (#4089)
* Added attributes save modes

* Added tensor names to IR

* Reformat code

* Unit tests and code refactoring

* Fixed error

* Code refactoring

* Code refactoring

* Code refactoring

* Error fixed

* Error fixed

* Bug fixed

* Bug fixed

* Additional unit tests and comments

* Added dest mode in Fuse Mul
2021-02-06 09:31:47 +03:00
Roman Kazantsev
bacb8420f0 [MO] Implement TensorFlow 2 While and Keras RNN support in MO (#3573)
* [MO] Implement TensorFlow 2 While support in MO

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

* Add extractors for both While and StatelessWhile and do minor changes

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

* Improve update_body_graph function and manage graph names properly

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

* Fix a map for original name of parameters from body and cond

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

* Implement draft version of support of TF2 Keras RNN

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

* Implement Keras LSTM and GRU support in MO

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

* Improve code for Keras RNN support

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

* Finalize implementation of TF2 Keras RNN support in MO

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

* Apply the first part of the comments after review #1

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

* Avoid use of explicit values of port indices in the transformation

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

* Finalize code after the first-round review

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

* Apply comments after the second-round review

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-01-21 17:39:57 +03:00
Maxim Vafin
500a95d960 Fix shape inference for Transpose nodes inserted by ApplyPermutes (#3348) 2020-12-01 11:54:29 +03:00
Maxim Vafin
a991ad926f Fix ApplyPermutations for the case when more then 1 input with permutes (#3095) 2020-11-17 11:58:01 +03:00
Maxim Vafin
9f0b26e14c Fix the NHWC->NCHW transformation for dynamic weights (#2848)
* Fix the NHWC->NCHW transformation when weights and data comes from same input

* Simplify code
2020-11-06 19:04:46 +03:00
Evgeny Lazarev
cabf8d8534 ONNX Loop operation support (#2756)
* Generate TensorIterator without back edges from TensorFlow models

* Added a check in the MarkSubgraphsWithCorrectLayout to not fail when port is not connected

* Updated the 'protobuf2nx' to consume the graph protobuf message

* Cleanup TI from the IRv7 specific code

* Do not run some front transformations recursively

* Draft support for the ONNX Loop operation when 'cond' = True

* LoopToTI transformation changes

* Added draft of Loop operation and parser for ONNX Loop operation body

* Updated Loop body parser + added shape and type infer for the Loop operation

* Fixes for ONNX Loop operation parser

* Moved Loop parsing to Loop op extractor. Added generation of external edges for the Loop body ops

* Added support for ThresholdedRelu using decomposition

* Added support for Min ONNX operation

* Draft fixes for port_map generation for the Loop

* Rename transformation file and fix BOM

* Fixed shape inference for Loop scan outputs (axis is not None)

* Fixed shape inference for ONNX Loop operation

* Refactor checks in the TensorIteratorMerge transformation

* Code refactoring. Enabled commented transformations

* Documentation update for ONNX Loop, ThresholdedRelu and Min

* Fixed typo in the Loop front transformation where execution condition input is connected. Other refactorings

* Fixed in the Loop extractor

* Added printing 'internal_layer_id' attribute in the graph dumper

* Updated calculation of iterations number for the Loop

* Added missing code

* Fixed output port shapes and types generation for Loop operation

* Update function names and variable names in the Loop operation

* Fixed type inference for iteration count input

* Added removal of input/output ports of the Loop if they are not used

* Fixed renumbering Loop operations input/output ports to keep mandatory

* Fixed ThresholdedReluDecomposition transformation

* Updated MO IR Reader to know about Loop operation. But it is still not supported by the MO IR Reader

* Added unit test for Slice op shape infer (reverse the sequence of elements)

* Reverted changes in the ONNX loader function call to protobuf2nx

* Enable Reshape0DToSqueeze transformation recursively

* Refactored Loop operation support implementation

* Changed ThresholdedReluDecomposition to generate Const with shape [1] instead of scalar

* Code style and wording fixes

* Restored accidentally removed 'return' statement in the TI shape infer function

* Fixed comments

* Fixed comment

Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
2020-10-27 23:04:43 +03:00
Roman Donchenko
0e502ffb35 [MO] Fix many spelling and grammar errors (#2543) 2020-10-09 12:16:12 +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
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
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
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
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
Alexey Suhov
5b428f0655 publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
Alexey Suhov
127cbac5bc publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
Alexey Suhov
95a57795dc Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
Alexey Suhov
b2140c083a Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
Alexey Suhov
0923303e02 Publishing 2019 R3 content 2019-10-04 19:26:43 +03:00
Alexey Suhov
ba6e22b1b5 Publishing 2019 R2 content (#223) 2019-08-09 19:02:42 +03:00
Alexey Suhov
72660e9a4d Publishing 2019 R1 content 2019-04-12 18:25:53 +03:00
Alexey Suhov
17e66dc5a6 Added unit tests and readme for model optimizer (#79)
* added unit tests
* added readme for model optimizer
* added a list of supported IE plugins
2019-01-23 20:23:27 +03:00
Alexey Suhov
9de27f16bc Publishing R5 content (#72)
* Publishing R5 content

* Updated ade revision

* updated readme

* add possibility to build CPU plugin with Intel MKL package
2019-01-21 21:31:31 +03:00
Alexey Suhov
55a41d7570 Publishing R4 (#41)
* Publishing R4
2018-11-23 16:19:43 +03:00
openvino-pushbot
866530fb04 Publishing R3 2018-10-16 13:45:03 +03:00