* [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>
* Commit.
* Written the header file of the nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Started to write cpp-file for the nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Deleted in_ports_count attribute for the MO operation ExperimentalDetectronROIFeatureExtractor.
* Written validate_and_infer_type() method of ngraph::op::v6::ExperimentalDetectronROIFeatureExtractor.
* Code style fixes.
* Code style fixes.
* Small fixes.
* Code style fixes.
* Now operation ExperimentalDetectronROIFeatureExtractor is read as nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Implemented op::v6::ExperimentalDetectronROIFeatureExtractor::clone_with_new_inputs().
* Added macro NGRAPH_OP_SCOPE to the cpp-file of the nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Fixes in some tests.
* Code style fix.
* Fixed yet another test for ExperimentalDetectronROIFeatureExtractor.
* Added tests for reading ExperimentalDetectronROIFeatureExtractor as operation from opset6.
* Added more test for reading ExperimentalDetectronROIFeatureExtractor as operation from opset6.
* Started to write shape infer tests for the nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Corrected ngraph/test/CMakeLists.txt.
* Small changes.
* Code style fix.
* Small fixes.
* Added ctor of ExperimentalDetectronROIFeatureExtractor with NodeVector as argument.
* Added setting the attribute in_ports_count when the MO operation ExperimentalDetectronROIFeatureExtractor is creating in the MO transformation ONNXMaskRCNNTransformation.
* Added shape infer for the second output of the nGraph operation ExperimentalDetectronROIFeatureExtractor.
* Written shape infer tests for nGraph operation ExperimentalDetectronROIFeatureExtractor (case when input shapes are partially dynamic).
* Small fixes.
* Code style fix.
* Deleted redundant &expected_channels.
* Code style fix.
* Small refactoring.
* Small fixes.
* Small changes.
* Small fixes.
* Deleted attribute distribute_rois_between_levels of ExperimentalDetectronROIFeatureExtractoe.
* Deleted attribute preserve_rois_order of ExperimentalDetectronROIFeatureExtractoe.
* Deleted attribute image_id of ExperimentalDetectronROIFeatureExtractoe.
* Now MO generates attribute 'aligned' of ExperimentalDetectronROIFeatureExtractor only with values 'true' or 'false'.
* Small fix.
* Fix in the conversion of the attribute 'aligned' of MO operation ExperimentalDetectronROIFeatureExtractor to string.
* Tabs were replaced by spaces in some XMLs.
* Tabs were replaced by spaces in ngraph_reshape_tests.cpp.
* Fixed copyrights.
* Applied small patch to IREngine from PR https://github.com/openvinotoolkit/openvino/pull/3814.
* Tabs were replaced by spaces in cnn_ngraph_impl_tests.cpp.
* op::v6::ExperimentalDetectronROIFeatureExtractor::validate_and_infer_types() was rewritten using operator & for channels.
* Added tests for input shapes of op::v6::ExperimentalDetectronROIFeatureExtractor in the case when inputs shapes consist of intervals.
* Fixes in test type_prop.detectron_roi_feature_extractor_intervals.
* Commit.
* Started to write nGraph operation ExperimentalDetectronDetectionOutput. Written draft of the header file.
* Written draft of the cpp-file for nGraph operation ExperimentalDetectronDetectionOutput.
* Small fix.
* Added reading of ExperimentalDetectronDetectionOutput as nGraph operation.
* Some fix.
* Unregistered old shape infer function of the operation ExperimentalDetectronDetectionOutput.
* Written the header file for the operation ExperimentalDetectronPriorGridGenerator.
* Small refactoring.
* Small fix.
* Added set_output_size(3) into op::ExperimentalDetectronDetectionOutput::validate_and_infer_types().
* Added check for number of inputs of ExperimentalDetectronDetectionOutput.
* Reverted some changes.
* Changed IR for ExperimentalDetectronDetectionOutput serialization test.
* Written cpp-file of nGraph operation ExperimentalDetectronPriorGridGenerator.
* Small fix.
* Some fixes.
* Fixes in type and shape infer functions of the MO operation ExperimentalDetectronDetectionOutput.
* Now ExperimentalDetectronPriorGridGenerator is readed as nGraph operation.
* Fixed the infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Started to write tests for the shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput.
* Written the draft of the test for the shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput.
* Small fix.
* Fixed ngraph/test/CMakeLists.txt.
* Started to write tests for the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Now the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator performs correctly case dynamic input shapes with static ranks.
* Continued to write test for the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Small fixes.
* Written tests for the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator (case when input shapes are partially dynamic).
* Added test for reading ExperimentalDetectronDetectionOutput as an operation from opset6.
* Some fixes.
* Added some debug outputs.
* Deleted inserted debug output.
* Small fixes.
* Small fix.
* Small fix.
* Small change.
* Added comments to attributes of ExperimentalDetectronDetectionOutput.
* Reverted changes.
* Deleted shape infer for output port 3.
* Small fixes.
* Deleted redundant keyword 'virtual'.
* Deleted redundant usings in header files of nGraph operations ExperimentalDetectronDetectionOutput and ExperimentalDetectronPriorGridGenerator.
* Some fixes.
* Small change.
* Now GridGenerator::validate takes three args (input partial shapes).
* Small fix.
* Deleted some usings.
* Small code style fix.
* Reverted changes in validate_and_infer_types() and validate() of op::v6::ExperimentalDetectronPriorGridGenerator.
* Added description of the class ExperimentalDetectronDetectionOutput.
* Added some comments into the header file of the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Some fixes.
* Added some comments to the class of the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Now the MO operation ExperimentalDetectronDetectionOutput has the attribute 'version' as 'opset6'.
* Now the MO operation ExperimentalDetectronPriorGridGenerator has the attribute 'version' as 'opset6'.
* Some fixes in the MO class ExperimentalDetectronDetectionOutput.
* Fixes in the shape infer function of the nGraph operation ExperimentalDetectronPriorGridGenerator.
* Renamed test XML model for ExperimentalDetectronDetectionOutput serialization tests.
* Added validation of input shapes for the nGraph operation ExperimentalDetectronDetectionOutput.
* Small fixes in the XML models for serialization testing of ExperimentalDetectronDetectionOutput.
* Added tests of shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput for the case when input shapes are partially dynamic.
* Added tests of shape infer function of the nGraph operation ExperimentalDetectronDetectionOutput for the case when some input shapes have dynamic ranks.
* Small fixes.
* Small fix in the MO operation ExperimentalDetectronDetectionOutput shape infer function.
* Fixes in op::v6::ExperimentalDetectronDetectionOutput::validate_and_infer_types().
* Code style fix.
* Small refactoring.
* Added NGRAPH_OP_SCOPE into ExperimentalDetectronDetectionOutput nGraph class.
* Added NGRAPH_OP_SCOPE to the nGraph class ExperimentalDetectronPriorGridGenerator.
* Small fixes.
* Some refactoring.
* Small fix.
* Small fixes.
* Reverted some changes in ExperimentalDetectronDetectionOutput::validate_and_infer_type().
* Now VPU reads the attribute class_agnostic_box_regression of ExperimentalDetectronDetectionOutput as Bool.
* Now MO generates attribute 'class_agnostic_box_regression' of ExperimentalDetectronDetectionOutput only with values false or true.
* Small fix.
* Tabs were replaced by spaces in some XMLs.
* Fixed copyrights.
* Refactoring in op::v6::ExperimentalDetectronDetectionOutput::validate_and_infer_types().
* Refactoring in op::v6::ExperimentalDetectronPriorGridGenerator::validate_and_infer_types().
* Small fixes.
* Started to write ExperimentalDetectronPriorGridGenerator shape infer tests for the case when dynamic input dimensions are intervals.
* Deleted redundant 'return'.
* Written tests for interval values of input shapes of op::v6::ExperimentalDetectronPriorGridGenerator.
* Code style fix.
* Code style fix.
* Fixed mapping of input name
* Fixed unit tests
* Fixed mapping of input name
* Fixed unit tests
* attributes check fix
* PEP8 code format
* code duplicate removal
* variable rename
* [MO] Implement transformation to avoid RandomUniform in a particular drop-out block
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove old RandomUniform transformation and correct const values
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix atol value
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Move DropoutWithRandomUniform transformation to the front
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Change just RandomUniform to Broadcast in the transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Correct comment for the transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove redundant line
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Initial support of GatherElements in MO and nGraph
* apply_style
* added lost extractor for GatherElements
* Corrected GatherElements::validate_and_infer_types
* updated package_BOM.txt
* Type_t added
* started to implement ngraph shape_type_infer unit-tests
* finally implemented all ngraph shape_inference unit-tests
* updated Supported_Frameworks_Layers.md
* added correct handling of dynamic shapes in nGraph, added unit-tests for dynamic cases, fixed dump typos in MO, replaced axis type from int -> int64_t
* implemented shape infer for dynamic shapes with intervals
* finalized MO implementation
* applied comment from review
* style-apply
* spec correction
* removed conflict
* fixed typos
* removed obsolete comments form type_prop
* significant corrections in validate_and_infer_types
* style-apply
* data_rank check for axis
* Config for TF 2.0 Faster R-CNN models, refactored subgraph_between_nodes to use graph API
* Added support for new type of Preprocessing block in the TF 2.0 OD API models. Various fixes to enable the Faster R-CNN ResNet 50
* Updated text comments
* Fixed sub_graph_between_nodes for TensorIteratorMerge. Added support for the TF 2.X EfficientDet models (not yet reshape-able)
* Fixed unit tests
* Fixed regression for TF 1.X OD API SSD model, enabled TF 2.0 OD API SSD models
* Code clean up
* Switched TF 2.0 OD API Faster R-CNN to preprocessor replacement type 2
* Refactored ObjectDetectionAPIPreprocessorReplacement and ObjectDetectionAPIPreprocessor2Replacement
* Fixed bug in the Div transformation to Mul when input is integer.
* Added support for the TF 2.0 OD API Mask R-CNN
* Added unit tests for Div operation. Updated incorrectly modified mask_rcnn_support_api_v1.14.json
* Updated document with list of supported configuration files for TF OD API models
* Review comments
* Added tests for control flow edges for the sub_graph_between_nodes function
* Two more tests
* Fix missed/redundant attrs for some operations
* Align auto_pad attr values in spec
* Update MO IR Reader extenders for appropriate operations
* Allign auto_pad attr values for appropriate operations
* Remove changes in extenders
* Update backend_attrs for some operations
* Changes in shape_infer functions to correct work with explicit mode
* Apply offline comments
* initial commit
* initial commit
* move fix to tf conv_extractor
* added 3d case
* fix e2e with 3d conv
* remove 3d case
Co-authored-by: yegor.kruglov <ykruglov@nnlvdp-mkaglins.inn.intel.com>
* Started to write equality comparator for StridedSlice layers.
* Now considered only unique StridedSlice consumers of non-constant data nodes.
* Fixed test for the transformation ConvertGroupedStridedSlice.
* Deleted commented code.
* Small fixes.
* Moved functions unique_by and group_by_with_binary_predicate to mo/utils/utils.py.
* Deleted function collect_sequences.
* Added asserts into the constructor of StridedSlice.
* Written test for the case when 1) there are 4 StridedSlice operations; 2) 2 of StridedSlice have the same data; 3) 2 others StridedSlice have the same data; 4) all StridedSlice operations outputs are consumed by different operations.
* Added some comments.
* Fix ElementwiseInputReshape transformation
Reshape node always needs to be inserted
in order to preserve ShapeOf nodes (reshapability of a model) that can potentially be above
elementwise node.
Refactor EltwiseInputReshape_test and EltwiseInputNormalization_test since the logic of maintaining reshape for eltwise has been changed.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Merge EltwiseInputNormalization and EltwiseInputReshape transformations
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove Unsqueeze from Fused_op
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after code review #1
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after review #2
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code review #4
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Perform full normalization based on shapes of all inputs to eltwise
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Refactor much to avoid old API and edges with unsqueeze_dims attribute
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix code after review
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* added getting nms_threshold/iou_threshold from original TF RetinaNet model
* iou_threshold definition added
* fixed getting iou_threshold for TF NMS V2, some minor corrections
* added box_encoding to NMS extractors
* Fixed transformations looking for FusedBatchNorm operation to consider FusedBatchNormV2 and FusedBatchNormV3 also.
* Updated unit test for FusedBatchNormTraining
* Fixed unit test
* Added support for a new version of the TF OD API pre-processing part of the mode
* Get rid of legacy API usage
* Fix comment and added assert
* Wording
* Commit.
* Written draft of NonMaxSuppression-5 class.
* Written conversion of the value of the second output of MO NonMaxSuppression-5 into TF format.
* Fixed type infer for the port 1 of NonMaxSuppression-5.
* Added Reshape to [1] for 0D inputs of NMS-5.
* Small fix.
* Corrected assert for number of inputs.
* Fixed docstrings for transformations TFNonMaxSuppressionNormalize and NonMaxSuppressionNormalize.
* Now the transformation TFNonMaxSuppressionNormalize uses find_and_replace_pattern().
* Moved model-optimizer/extensions/front/onnx/non_max_suppression_normalize.py to model-optimizer/extensions/front/non_max_suppression_normalize.py, to delete duplicate code.
* Deleted commented code.
* Fixed BOM-file.
* Deleted out_ports_count from NMS.
* Fixes in type_infer of NMS-5.
* Small changes.
* Added some comment.
* Small fix.
* Some fixes.
* Added transformation config to support automl efficientdet-4 model
* Added configuration file to convert Automl EfficientDet model
* Updated unit test for Pack
* Added instruction on how to convert EfficientDet Tensorflow model
* Updated documentation on how to convert EfficientDet model
* Updated a documentation with instruction on how to convert Automl EfficientDet.
* 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>
* Add hsigmoid fusing for MO
* Update Bom file
* Remove comments
* Refactoring hsigmoid fusion according to review
* Add div and mul patterns for hsigmoid fusion
* Refactoring code according to review
* Fix HSigmoid fusion transformation
* 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>
* Implement LookupTableInsertV2 shape inference
It is needed if other nodes not beeing pruned in the graph
have a conditional dependence on LookupTableInsertV2 node.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix after core-review #1
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix the code after review #2
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix after code review #3
* Extend MO for operation GatherND
* Update documentation
* Rename GatherNd.py to gathernd.py
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>