Commit Graph

227 Commits

Author SHA1 Message Date
Ruslan Nugmanov
5ad2400468 takeaway parsing arguments in separate func (#7266) 2021-09-21 14:45:05 +03:00
Gleb Kazantaev
07d9b51121 Replace IR Reader With IR Frontend (#7249)
* Replace IR Reader With IR Frontend
2021-09-20 23:17:22 +03:00
Roman Donchenko
8598ce89a3 Add missing spaces between words in string literals (#7540)
And in one case, a missing period.
2021-09-20 15:38:49 +03:00
Anton Chetverikov
9cfdad9afc Change sort functions to fix incorrect order in port dictionaries (#7283)
* Change sort functions to fix incorrect order

* Add separate sorts for different cases

* Update sort function to correct control flow edges handling

* Refactor all sorts for dictionary ordering

* Update build_graph function for correct control_flow edges creation

* Add tests for nodes and ports sort equality

* Fix wrong port value

* Add direct conversion from bool to int

* Use .replace instead of .strip

* Add test with both control_flow and ordinary edges, refactored edges lists filling

* Refactored nodes dict filling

* Delete unused test code
2021-09-20 10:17:44 +03:00
Ilya Lavrenov
0df7dab345 New IRC package structure (#6255)
* OV new package structure

* Fixes

* More fixes

* Fixed code style in ngraph tests

* Fixes

* Paths to setupvars inside demo scripts

* Fixed demo_security_barrier_camera.sh

* Added setupvars.sh to old location as well

* Fixed path

* Fixed MO install path in .co

* Fixed install of public headers

* Fixed frontends installation

* Updated DM config files

* Keep opencv in the root

* Improvements

* Fixes for demo scripts

* Added path to TBB

* Fix for MO unit-tests

* Fixed tests on Windows

* Reverted arch

* Removed arch

* Reverted arch back: second attemp

* System type

* Fix for Windows

* Resolve merge conflicts

* Fixed path

* Path for Windows

* Added debug for Windows

* Added requirements_dev.txt to install

* Fixed wheel's setup.py

* Fixed lin build

* Fixes after merge

* Fix 2

* Fixes

* Frontends path

* Fixed deployment manager

* Fixed Windows

* Added cldnn unit tests installation

* Install samples

* Fix samples

* Fix path for samples

* Proper path

* Try to fix MO hardcodes

* samples binary location

* MO print

* Added install for libopencv_c_wrapper.so

* Added library destination

* Fixed install rule for samples

* Updated demo scripts readme.md

* Samples

* Keep source permissions for Python samples

* Fixed python

* Updated path to fast run scripts

* Fixed C samples tests

* Removed debug output

* Small fixes

* Try to unify prefix
2021-09-15 16:49:11 +03:00
Anastasia Popova
cf48792134 Random Uniform MO implementation (#6694)
* Added RandomUniform operation.

* Conflicts fix.

* Fix conflicts.

* Fix conflicts.

* Added ONNX extractor, fixed FP16 conversion, added double implementation.

* int32, int64 types.

* Added initial type attribute.

* Added extractors for MxNet and TF for RandomUniformInt.

* Fixed ChangeRandomUniformOutputType transformation.

* Corrected ONNX, MxNetextractors.

* Fixed extender.

* Code style corrected, updated BOM file.

* Small correction.

* Code reformat.

* Fixed type check.

* Small corrections, code style.

* Added RandomUniform tests to manifest file.

* Include fixed.

* Code style.

* Small corrections.

* Tests fixed.

* Manifest file updated.

* Removed initial type attribute.

* Small correction.

* Fixed problem with Const types change.

* Update ngraph/core/include/ngraph/op/random_uniform.hpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update ngraph/core/src/op/random_uniform.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Update ngraph/core/src/op/random_uniform.cpp

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>

* Applied comments to shell implementation.

* Applied comments to shell implementation.

* Moved shell and reference to separate PR.

* Moved shell and reference to separate PR.

* Corrected comments, code refactoring.

* Fixed seed attributes.

* Corrected mxnet extractor.

* Returned RandomUniform onnx extractor.

* Small fix.

* Used generator in tests, fixed input ports count in AttributedRandomUniform.

* Temporarily added DropoutWithRandomUniformReplacer and debug output.

* Temporarily added DropoutWithRandomUniformReplacer and debug output.

* Temporarily added DropoutWithRandomUniformReplacer and debug output.

* Temporarily added DropoutWithRandomUniformReplacer and debug output.

* Moved DropoutWithRandomUniformReplacer to ngraph, removed debug output.

* Fixed wrong change.

* Fixed wrong change.

* Added check that RandomUniform is in ShapeOf subgraph.

* Added layer tests, updated supported operations list.

* Small correction.

* Fix conflicts.

* Fix conflicts.

* Small fix.

* Used const for not changing values.

* Apply suggestions from code review

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* Added IR check in layer tests.

* Fixed error.

* Fixed test.

* Update inference-engine/src/transformations/include/transformations/common_optimizations/dropout_with_random_uniform_replacer.hpp

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* Removed ShapeOf and Mul from DropoutWithRandomUniformReplacer.

* Replaced register_new_node with make_shared.

* Added fp16 test.

* Extended for RandomUniform->Convert case.

* Used modf().

* Removed modf().

* Update inference-engine/src/transformations/src/transformations/common_optimizations/dropout_with_random_uniform_replacer.cpp

Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>

* Added negative tests, added nullptr check for add_const_value.

Co-authored-by: Ilya Churaev <ilyachur@gmail.com>
Co-authored-by: Gleb Kazantaev <gleb.nnstu@gmail.com>
2021-09-14 21:26:57 +03:00
Yegor Kruglov
9d53b3536d [MO] Updating MO to detect TF 2.X OD API models (#6983)
* updated FasterRCNN and SSD analysis patterns

* updated tf od api conditions

* updated ssd patterns

* added more ssd topologies

* move preprocessor to tf od api condition

* update TF OD API conditions

* refactoring

* specify data type
2021-09-10 17:44:42 +03:00
Pavel Esir
f68a116af1 [MO] add uint32/uint8 into list of supported data types (#7424) 2021-09-09 16:40:31 +03:00
Evgeny Lazarev
4547818fb1 Move TF OD API docs to code + several fixes for TF OD API models conversion (#7377)
* Refactored code, updated comments and documentation related to TF OD API models pre-processing.

* Improved MO messages related to pre-processor block removal during conversion of the TD OD API models. Remove mean/scale if padding is used and mean/scale is applied before resize

* Updated TF OD API transformation and documentation for SSD models

* Updated comments and documentation for the ObjectDetectionAPIMaskRCNNSigmoidReplacement transformation

* Updated comments and documentation for the ObjectDetectionAPIMaskRCNNROIPoolingSecondReplacement transformation

* Updated comments and documentation for the ObjectDetectionAPIPSROIPoolingReplacement transformation

* Updated comments and documentation for the ObjectDetectionAPIProposalReplacement transformation

* Updated comments and documentation for the ObjectDetectionAPIDetectionOutputReplacement transformation

* Minor code style fixes

* Fixed unit tests for ObjectDetectionAPIPreprocessor2Replacement transformation

* Improved unit test for pipeline.config parser. Fixed very long bug with incorrect test data for the PipelineConfig parser class

* Code style fixes

* Get rid of "coordinates_swap_method" parameter in the JSON configuration file for TF OD API models

* Code style fixes and minor refactoring

* Simplied code related to swapping Proposal coordinates

* Removed incorrectly removed code

* Fixed code review comments about the code comments
2021-09-08 10:03:01 +03:00
Evgeny Lazarev
3775dad345 MO dynamic shapes support (#5918)
* Allow MO to generate IR with -1 in dimensions

* Some fixes to support -1 for StridedSlice operation

* Updated TensorArrayGatherV3 shape infer to support dynamic output shape

* Several fixes to support undefined dimensions in the Broadcast,Reshape,Slice and Tile

* Fixed bug in the normalization transformation of TF NMS to opset NMS

* Updated shape infer functions related to StridedSlice and NMS

* Updated Select shape inference function to use common shape broadcasting function supporting dynamism

* Fixed operation TFResize shape infer function to work correctly for case when model is converted with --disable_nhwc_to_nchw

* Dynamic Range and update asserts in NMS

* Changed the way how dynamic dimensions are specified. Refactored shape inference functions and common places to use new approach

* More fixes to support dynamic shapes

* More fixes for support of dynamic shapes

* Fixed generation of IR with dynamic dimensions

* Allow reading IRs with undefined dimensions

* More changes in the IE to support dynamic dimensions

* Fixes for Switch, Merge, Concat shape and value infer related to dynamism

* Fixed TensorArray related ops to properly handle dynamic dimensions. Fixed StridedSlice infer for case with new_axis

* Fixed shape_for_layout function to generate masked array

* Fixed shape inference for Convolution and Poolings to support dynamic spatial dimensions

* Updated shape infer functions for CTCGreedyDecotder, CTCLoss and Enter

* Fixed shape inference with dynamic dimensions for MatMul, Split, Upsample, SpaceToBatch, some fixes for the TI

* Fixes for undefined dimensions support for Proposal and DetectionOutput

* Fixed ExtractImagePatches, DepthToSpace and RegionYolo shape infer functions to work with partially dynamic dimensions

* Changes in tf_window_op_pad_infer to better work with dynamic dimensions

* Fixed output shape calculation for StridedSlice operation

* More StridedSlice fixes

* Fixed resolve_convolution_with_group

* Fixed unit tests

* Fixed unit tests

* Fixed Switch op unit tests

* Fixed shape inference for Upsample operation

* Updated unit tests for the Concat operation

* Fixed eltwise shape infer unit tests

* Fixed shape infer tests for Convolution and DetectionOutput ops

* Fixed Crop shape infer function tests

* Fixed Slice op unit test and minor fix in the shape inference. Fixed emitter

* Updated unit test for telemetry and match_shape function for dynamism

* Fixed unit test for the DetectionOutput

* Added support for the TF ClipByValue operation

* Fixed GatherND shape inference for dynamic shapes support

* Dynamic shapes support for the MO IR Reader

* Fixed BlockLSTM operation to not work as an extractor

* Allow to serialize IRs with partially defined shapes

* Updated SelectBroadcast transformation to not check shape values

* Fixed MO IR comparator

* Fixed SS value propagation when slices are dynamic

* Do not re-run graph clean-up for ProposalMutation

* Fixed InterpolateSequenceToInterpolate transformation to support dynamic dimensions

* Fixed Loop iteration count calculation and reading IteratorGetNext shapes

* Fixed unit test for serialization

* Fixed serialization test

* Fixed RandomUniform shape infer

* Fixed several transformations related to RNN to respect dynamic output shapes

* Fixed Deconvolutin shape calculation for dynamic batch. Eltwise shape infer improvements

* Fixed shape infer functions for ExperimentalDetectron ops, reverted changes for NonZero and removed debug prints

* Fixed check for dynamism of a list, fixed value propagation for Concat op and remove redundant shape infer for reshape

* Update Eltwise value propagation to use np.ma

* Fixed ExpandDims shape infer function

* Shape infer functions fixes and improvements

* Remove Accum op from the MO

* Updated activation functions shape infer

* Removed unsupported operation Correlation

* Fixed shape infers for several functions

* Removed unsupported DataAugmentation operation

* Fixed shape infer functions for several ops in extensions directory

* Removed not-support operation PowerFile

* Removed unsupported SpatialTransformer,SimplerNMS and PredictionHeatmap operations

* More shape infer functions updates

* Merge shape infer fix

* Fixed typo

* Fixed TensorArraySize shape infer function

* Fixed VariadicSplit and Squeeze shape infer

* Fixed ONNX models Parameter extractor

* Updated Select value propagation for the dynamic case

* Fixed ReorgYolo shape infer and test

* Removed unnecessary tests

* Fixed Tile shape infer

* Fixed SparseFillEmptryRows unit tests

* Fixed package bom

* Added extractor for the TF operation Mod

* Fixed value propagation for MatMul operation

* Updated Parameter extender to generate shape_array when shape is partially defined only

* Fixed BOM file

* Fixed issue with the TF OD API models and DetectionOutput op. Now the shape infer function for the DO do not re-infer "num_classes" attribute value if it is already known

* Fixed unit test for the DO infer

* Fixed num classes calculation for the DO generation for Faster/Mask-RCNN models

* Changed NMS op to produce static output shape

* Restore dynamic output shape calculation for the NMS for NMS-5

* Fixed CellNormalizer transformation. It should work for static shapes only

* RNNCell Op class fixes

* Revert some changes

* Updated documentation with a list of supported operations

* Revert changes

* Fixes for the ConstantFill op

* Removed redundant SequenceLengthToMask transformation

* TensorArray* ops shape infer code style and refactoring

* Reverse some unnecessary changes in the ConvolutionNormalizer

* Fixes and unit tests for shape_array, compare_shapes, is_fully_defined functions

* Implemented shape_insert, shape_delete functions and tests for them

* Modified code to use shape_delete function

* Added usage of shape_insert function where necessary

* Use shape_insert function in many places

* Some fixes in shape inference for various ops

* Updated shape_delete function to support negative indices

* Changes and unit tests for the MatMul infer function

* Removed strange code from the TF Merge infer function

* Merge op shape infer fixes

* Fixed value propagation in the transformation EltwiseInputReshape.py for the dynamic dimension case

* Code cleanup

* Updated GatherND to support dynamic dimensions

* Minor fixes

* Fixed shape_insert and shape_delete to support np.int64 and np.int32 types

* Updated Upsample operation unit tests with dynamic input shapes

* Minor change in the extensions/back/ConvolutionNormalizer.py to make sure that input dimensions are static

* Fixed ConvertGroupedStridedSlice transformation and added unit tests

* Revert debug changes

* Fixed value propagation for Unsqueeze to work with partially defined input values

* Typo fix

* Added unit tests for the Unsqueeze op shape infer

* broadcasting functions changes and unit tests

* Fixed Tile value inference for partially defined input tensor

* Unit tests for Split and VariadicSplit ops

* Fixes for the Concat infer + unit tests

* Removed redundant tf_pack shape infer

* Fixed Concat value infer and added unit tests

* Fixed StridedSlice shape inference for case with dynamic slices

* Fixes related to StridedSlice shape infer, changes in tests

* Unit tests for the eltwise shape and value infer

* Fixed Pad op value propagation to allow dynamic input values to be propagated

* Unit test for Pooling dynamic input shape infer

* Squeeze op unit tests for dynamic input shape

* Added assert to the Squeeze op shape infer for case when squeeze dimension is dynamic value

* Added message to the MO when input shapes are dynamic

* Convolution dynamic unit test

* Removed redundant transformation GroupedConvWeightsNormalize

* Removed non-ascii character from the message

* Fixed typo in the BOM file

* Code style and comment fixes

* Fixed copy-paste issue in the DO shape infer function

* Fixed setting dynamic shape in the MO command line

* Added function to compare tensor with dynamic values. Fixes in the unit tests and shape infer functions

* Improved Reshape shape infer + added unit tests

* Fixed value propagation for Select op

* Renamed several internal functions, minor code fixes.

* Code style fixes

* Modified condition in the _set_shape method of the Port class to not check shape if the "override_output_shape" attribute is specified

* Fixed constant value propagation for ReduceOps when inputs have dynamic values. Added unit test

* Fixed shape infer for the Loop for dynamic dimensions case

* Fix in the NMS shape infer to avoid ragged numpy array generation. Fixed Scatter shape infer validation

* Improved shapes infer for eltwise ops with respect to dynamic dimensions

* Changed code comments

* Renamed tensor names in the ClipByValueTFTransformation

* Changed np.ma.allequal to strict_compare_tensors in the Merge op infer

* Chanded np.ma.allequal with strict_compare_tensor.

* Fixed Merge op value infer

* Fixed debug code

* Removed commented line

* Updated condition to check for dynamic shapes in the Partial infer to not fail for MxNet models

* Improvements to the get_shape_from_slice and is_dynamic_slice functions

* Reverted change in the `normalize_slices_attr` for ellipsis mask case

* Updated shape conditions in the ScatterNDBase op to support dynamic dimensions

* Crop op file refactoring

* Set "type" attribute to None for SparseFillEmptyRows op which is not from any opset

* Removed unnecessary extractor test

* Restored Crop operation type

* Removed "type" attribute from the Crop operation and updated the MO code to find Crop by "op" attribute

* Fixed If shape infer function to produce dynamic dimensions

* Updated If shape and value infer to properly work when condition is static

* Fixed fusing transformation check to work with dynamic dimensions. Change comparison in the shape_inference function to not use strict shapes comparison

* Optimize imports in the LayerNorm

* ConvertGroupedStridedSlice minor fixes related to dynamism support

* Fixed ConvertGroupedStridedSlice to properly check if the dimension is sliced
2021-09-01 14:35:06 +03:00
Roman Kazantsev
494aaef6ae Suppress obsolete MO parameters (#7276)
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-08-31 15:43:38 +03:00
Mateusz Bencer
0e521a1e22 Use ONNX Frontend instead of ONNX Reader (#7031)
* added get_name

* add support to supported_impl

* remove debug code

* review remarks

* changed name to onnx_experimental

* fixed test

* revert onnx_experimental name

* integrate reader and fe api

* add unit tests

* removed prototxt from model_validator

* reader refactor

* add supress

* Update inference-engine/src/readers/onnx_reader/ie_onnx_reader.cpp

Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>

* fix segfaults

* removed onnx reader

* handle istringstream

* wstring support

* removed saving path

* styles applied

* changed name to onnx experimental

* Apply suggestions from code review

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* skip onnx_experimental frontend in mo.py

* add support of wstring paths

* fix wstring ctor of InputModelONNX

* added NGRAPH_SUPPRESS

* make one instance of manager

* change onnx_experimental name to onnx

* creation frontend manager refactor

Co-authored-by: Tomasz Dołbniak <tomasz.dolbniak@intel.com>
Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
2021-08-26 11:50:53 +03:00
Pavel Esir
f77d838e6c [MO] turn on MarkSubGraphsWithCorrectLayout for TF NCHW (#7150)
* turned on MarkingSubgraphsWithCorrectLayout for TF NCHW

* restricted MarkSubgraphsWithCorrectLayout.py only to TF

* added comments why need to MarkSubgraphsWithCorrectLayout even for TF NCHW models
2021-08-20 18:47:45 +03:00
Eugeny Volosenkov
38022c4cd6 Mo implementation for If with tf extractor (#6662)
* Add tf2.x impl for If

* Fix ir_engine

* Fix opset

* Fix BOM file

* Added new test

* Fix comments

* Add subgraph_utils

* Fix comments

* Fix transform

* code refactoring

* Fix description

* rewrite support for empty tensor in if

* added onnx extractor

* delete onnx_if

* fix bug with fake_outputs

* Fix test

* Fix control_flow and fix commentaries

* create method results_mapping_and_finding_fake_outputs(output_nodes_in_subgraph,
2021-08-19 10:13:21 +03:00
Anton Chetverikov
6369f43c99 Support unregistered operations in MO IR Reader (#6837)
* Add support for unregistred operations in MO IR Reader

* Remove commented lines

* Add shapes equality check

* Update comments

* Update groupconv_to_conv function to support case with multiple destinations

* Add ir_data_attrs attribute to restored layers

* Update copy_shape_infer function to new graph api

* Add attribute IE to unsuppurted operations to save their attributes

* Fix wrong attribute name

* Update commentary

* Partially revert updating to new Graph API to fix regression, add appropriate comments

* Update code comments

* Rename copy_shape_infer function and add more comments
2021-08-18 12:56:13 +03:00
Kate Generalova
56bb84f0b2 fix mo module version check (#7041)
* fix mo module version check

* add one more version check
2021-08-16 21:22:40 +03:00
Mikhail Nosov
c4bd0a45d3 MO: Support of discovering of suitable MOC frontend (#6888)
* MO: Support of discovering of suitable MOC frontend if --framework is not specified

* Ready for review

* Fix: don't use FrontEndManager if framework is not in list of available frontends

* Apply review comments
2021-08-10 09:23:30 +03:00
Mateusz Bencer
e4dfff387b Apply moc transformations on FE API path (#6871)
* apply moc transformations

* changed type of net in apply_moc_transformations

* review remarks

* args->argv typo
2021-08-05 18:08:40 +03:00
Roman Kazantsev
032cebb9da Implement transformation for TensorFlow 2 Map Function (aka tf.map_fn) (#6836)
* Implement transformation for TensorFlow 2 Map Function primitive

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

* Add a description for get_external_node_by_internal_id function

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

* Correct a name for get_external_nodes_by_internal_id function

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

* Fix a description for get_external_nodes_by_internal_id function

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

* Add logging and fix indentation

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

* Use skip_nodes_by_condition to by-pass StopGradient nodes for tf.map_fn

Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
2021-07-30 12:10:59 +03:00
Ivan Tikhonov
6673a90659 MO DeformableConv: fix a set of attributes (#6806)
* MO DeformableConv: fix a set of attributes

* codestyle

* resolve review comments

* resolve review comments
2021-07-29 13:49:12 +03:00
Mikhail Nosov
868fad33ab [MO] Add support to moc_frontend of ":" as delimiter for --input and --output (#6543)
* [MO] Add support to moc_frontend of ":" as delimiter for --input

Additions:
Changed default logic for 'Place::get_in(out)put_port' to return nullptr
Changed default logic for 'InputModel::get_place_by_tensor(operation)_name' to return nullptr

* Corrected comments in code

* Missing empty line

* Clang format fixes

* Fix review comments

* Updated test to verify review comments fixes

* Update unit tests after rebase

* Apply review comments
2021-07-29 13:09:51 +03:00
Mikhail Nosov
a95d59014c Rename "pdpd" frontend to "paddle" (#6842)
* Rename "pdpd" frontend to "paddle"
Also renamed mo_pdpd.py+main_pdpd.py to mo_paddle.py+main_paddle.py

Class names were not renamed

* Update package_BOM.txt
2021-07-29 11:43:07 +03:00
iliya mironov
16d0c28314 Add check if fastjsonschema installed (#6775) 2021-07-26 11:39:44 +03:00
iliya mironov
e1bffcc36c Add json validate (#6449)
* Add json validate

* Fix json schema

* Fix schema loader

* Add unit test

* Update bom file

* Update all requarments

* Update dev requarments

* Update requrments

* Update path to schema

* Update schema

* Add some unit tests

* Move schema to root dir

* Update schema path in bom file

* Fix unit test

* Fix bom

* Change path to schema

* update setup

* Fix setup

* Fix mo args test

* Refactoring some code

* Refactoring according to review

* Update sort imports

* Remove id attribute from schema

* Refactoring validator

* Fix according to review

* Move schema from json to dict. Update unit tests.

* Fix BOM file

* Update bom file
2021-07-22 21:12:44 +03:00
Vladimir Gavrilov
abc6a336b1 Fixed processing tags in summarize_graph.py (#6726) 2021-07-22 14:39:54 +03:00
Mikhail Nosov
fbd0d8beba MO: ensure ngraph.frontend is installed (#6698)
MO: when finding IE/nGraph - add search path to beginning of PYTHONPATH, LD_LIBRARY_PATH
2021-07-21 14:18:51 +03:00
Maxim Vafin
960ba48e6f Rework model loading in FE manager, implement PDPD probing (#6358)
* Rework model loading in FE manager, implement PDPD probing

* Fix build

* Fix build

* Fix build

* Fix unicode

* Fix merge issues

* Fix codestyle

* Read frontends path from frontend_manager library location

* Fix codestyle

* Fix FE dependency

* Fix dependencies

* Fix codestyle

* Check if model file exists

* Revert adding model to lfs

* Add test model

* Fix cmake dependencies

* Apply review feedback

* Revert pugixml

* make getFrontendLibraryPath not public API

* Fix codestyle

* Apply fix from Ilya Lavrenov

* Add FE dependency in legacy tests

* Remove not needed dependency

* Better support Unicode

* Fix build

* Fix build

* Fix build

* Add dependency foe deprecated tests

* Fix dependency

* Fix typo

* Revert adding FE dependency to IESharedTests

* Remove relative paths from frontend unit tests

* Apply review feedback

* Fix typo

* Return allow-undefined, since kmb dependecies fail to link

* Fix merge conflict

* Compare functions in reader tests

* Simplify code to load from variants

* Remove supported_by_arguments from public api

* Fix codestyle

* Fix build

* Compare names in reader tests

* Fix wchar in variant

Co-authored-by: Ilya Churaev <ilya.churaev@intel.com>
2021-07-19 20:10:00 +03:00
Ivan Tikhonov
434fcec53c DeformableConvolution v8: MO and IR reader (#6532)
* ModulatedDeformableConvolution extractor

* Update MO to generate DeformableConv opset8

* clean up

* ir reader tests

* fix bilinear_interpolation_pad attribute

* update BOM file

* fix BOM file

* delete unnecessary tests

* resolve review comments

* fix e2e test

* fix e2e test

* resolve review comments

* add comment
2021-07-12 08:09:41 +03:00
Yegor Kruglov
b56164e804 [MO] Updating condition in TF Const value extracting (#6322)
* update value extracting condition

* added a comment

* updated unittest

* added a scalar test, little fix for scalar values extracting
2021-07-08 15:55:29 +05:00
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
Evgeny Lazarev
21d060ac2b Updated conversion of TF OD API 2.4 SSD models (#6473)
* Updated conversion of TF OD API 2.4 SSD models

* Fixed issue when more Conv2D nodes were selected for weights permutation when converting TF OD API models

* Code style fixes

* Fixed code comments
2021-07-02 17:35:59 +03:00
Svetlana Dolinina
ccf786438b Kaldi priors (#6258)
* add priors to loader and counts transformation

* fixes in select insertion for case with context gathering - LSTM - context gathering
fix for edge parallel to ReadValue
extend counts option to case of priors inside mdl model file

* fixed tests

* fixed typo

* fixed issue with input names

* fix priors loading + comments

* fix e2e test: error with not found transformation

* print debug info for dependency graph - should be reverted

* should be reverted: debug commit

* Revert "fix e2e test: error with not found transformation"

This reverts commit 8320fa99bf.

* revert debug commits

* fixes after review

* review fixes

* review change

* review changes
2021-07-02 15:18:23 +05:00
Mikhail Nosov
ae624ea18a [MO] Fix showing graceful error message when no ngraph case (#6379)
* [MO] Fix showing graceful error message when no ngraph case

Move frontend-related imports inside appropriate functions
And use try/except if import fails to show graceful error message

* Revert "[MO] Fix showing graceful error message when no ngraph case"

This reverts commit 72d52bd946.

* Print error before running of subprocess if IE or nGraph Python API is not found

* Added pytest to requirements_dev.txt

* Fixed review comment
2021-07-01 09:49:18 +03:00
Mikhail Nosov
d49405a0e8 [MO] Initial support of nGraph Frontend API (#6001)
* [NG Frontend] Introduce classes and macros for Frontend-specific exceptions

* [nGraph Frontend] Python bindings

Exposing Python API for nGraph FrontEndManager introduced in PR #5470

* Exposing 'Dimension' class to Python nGraph API

* Model optimizer code from pdpd_frontend

Removed 'use_legacy_frontend' option as not needed for PDPD integration

* Added XML/BIN prints for 'ngraph-FE' serialization path

* Update python bindings to latest code from PR #5995

* Add OV_FRONTEND_PATH to LD_LIBRARY_PATH by default for Model Optimizer

* Test with 'mock' frontend

* Added meta info to generated IR

Added more tests to cover currently supported scenarios
Clang config for MO mock frontend

* some flake8 and pylint fixes

* Try to 'import' ngraph-related packages on top of python files

This will help to specify type of function arguments, but can break unit tests if they're using functions directly without ngraph

* CI fixes

* Run tests from 'main_test.py' inside ngraph environment

* Fixed review comments

* Fixed comments
Added more tests for checking if inputs and outputs are same

* Renamed front_ng to moc_frontend

* Update package_BOM.txt
2021-06-24 12:21:15 +03:00
Gleb Kazantaev
ea3ed8af21 Turn on IE and NG python APIs by default inside Model Optimizer (#5721)
* Turn on IE and NG python APIs by default inside Model Optimizer

* Remove fallback

* Fix mo_ut

* Remove MO wheel tests

* Add model_optimizer custom target to gather all MO deps inside single traget

* Fix PR comments
2021-06-16 03:12:24 +03:00
Svetlana Dolinina
de2a163363 Error during Caffe model conversion with Python3.8 (#6056)
* added one more possible reason for Caffe error during caffemodel parser in code + add error description to FAQ
Also added MxNet error to FAQ based on Kate Generalova wording

* review fixes

* wording polishing

* wording polishing

* review fixes

* review fixes

* Update docs/MO_DG/prepare_model/Model_Optimizer_FAQ.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/MO_DG/prepare_model/Model_Optimizer_FAQ.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/MO_DG/prepare_model/Model_Optimizer_FAQ.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* Update docs/MO_DG/prepare_model/Model_Optimizer_FAQ.md

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>

* review fixes

Co-authored-by: Tatiana Savina <tatiana.savina@intel.com>
2021-06-08 16:09:04 +03:00
Anastasia Popova
327c3149f6 Fixed feature dimension calculation in grouped_convolutions_fusing(). (#6054)
* Fixed feature dim calculation in concat_convolutions().

* Fixed feature dim calculation in concat_convolutions().

* Added comments, added unit test.
2021-06-08 09:53:39 +03:00
Yegor Kruglov
4d9fe14ec6 [MO] ConvolutionWithGroupResolver update to enable TF DepthwiseConv2dNative with in_channels=1 (#5528)
* changed permutation attribute in conv extractor

* changed conv get_group parameter

* implemented a transformation

* updated BOM

* specified transformation for in_channels 1

* added unittest and comment string

* updated convolution normalizer to convert depthwise convolution with group=1 to group convolution

* renamed function

* updated IR reader

* conversations resolving

* condition change
2021-06-07 20:22:26 +03:00
Ivan Tikhonov
c1608628d4 LowLatency v2 ngraph transformation (#5160)
* LowLatency 2.0: transformation and unit tests

* low latency 2.0: unit tests

* documentation and ngraph codestyle

* update CNN Interface of LowLatency transformation

* fix build on Windows

* fix build on Windows

* investigation of a failed build on Win OS

* ngraph codestyle

* fix build (werrors)

* New unit tests, refactoring

* update functional tests for Memory

* update LowLatency functional tests

* extend Memory tests to cover LowLatency v2 transformation

* clean up, code style

* fix unit tests

* update and fix unit tests, add feature to apply LLTv2 after LLTv1

* update docs, refactoring

* add several gna tests to skip config

* fix python api tests

* update python api, rename LowLatency_v2 to LowLatency2

* deprecate LowLatency v1

* Deprecate LowLatency v1 in IE

* fix wrong merge, codestyle

* resolve review comments

* fix python test

* update skip config

* apply online review notes, fix unit tests

* clean up, code style

* fix docs

* Use debug_messages instead of exceptions in llt v2

* fix unit tests

* Resolve review remarks
2021-06-07 15:13:41 +03:00
Eugeny Volosenkov
859a3b8a30 Deprecated warnings fix in MO (#6016)
* Add code style fixes

* Revert "Add code style fixes"

This reverts commit 490934f243.

* Fix Invalid escape sequence

* Fix Invalid escape sequence
2021-06-04 16:53:30 +03:00
Anastasia Popova
b1e7a5cdb1 Fixed duplicate names appearance in graph after fuse mul transformation. (#5842)
* Added manual set of unique name to the data node.

* Added attributes checks in unit test.

* Removed redundant line break.
2021-05-28 16:37:43 +03:00
Anton Chetverikov
9d3780648f Add missed attributes for Parameter layer (#5676)
* Add shape and element_type to ir_v10_attrs structure

* Add comment

* Update add_input_op_input_port_with_data() and add_input_op_output_port_with_data() functions with new GraphAPI

* Remove incorrectly added test

* Apply comments

* Update missed tests

* Add more checks to tests

Co-authored-by: achetver <anton.chetverikov@.intel.com>
2021-05-28 10:22:06 +03:00
Gleb Kazantaev
98ac1d04c3 Fix IE Python API search inside MO for Windows platform (#5862) 2021-05-28 09:57:16 +03: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
Evgenya Stepyreva
ffc9c95a2b Revert "Fuse mul transformation fix (#5518)" (#5831)
This reverts commit 84b94c9834.
2021-05-26 16:07:46 +03:00
Maxim Vafin
d8d9819b5f Fix security issue with XML parsing (#5686)
* Fix security issue with XML parsing

* Apply review feedback

* Rework defusing stdlib solution

* Apply review feedback
2021-05-26 14:17:55 +03:00
Gleb Kazantaev
7933e9f61d Find ie api based on platform (#5820)
Co-authored-by: Gleb Kazantaev <gleb@nncv666el.inn.intel.com>
2021-05-26 09:07:37 +02: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
Vladimir Gavrilov
2bc69da1d1 Fix in model-optimizer/mo/back/ie_ir_ver_2/emitter.py. (#5742) 2021-05-21 18:58:03 +03:00
Yegor Kruglov
40c5d116e3 Updated condition in metadata depersonalize function (#5655)
* updated condition in metadata depersonalize function

* renamed list with keys

* removed unnecessary key
2021-05-21 18:08:57 +03:00