* [TF FE] Optimize FusedBatchNorm translator - avoid Transposes
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix FusedBatchNorm: correct compute for batch_mean and batch_variance
* Add layer tests and fix based on them
* Mark failing test cases and bind to issue tickets
* Work around tests for FusedBatchNorm in inference mode
* Use separate fictitious constants for reserved outputs
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* convert() method added.
* Moved conversion to convert() method.
* Fixed commits.
* Output dir fix.
* Added objects support for extesions param.
* Added support for transformations_config extension objects.
* Input to str unit tests.
* Added tests, added comments.
* Updated BOM.
* Removed commented code.
* Fixed extension passing.
* Small corrections.
* Fixed for python 3.6.
* Small fix.
* Moved dir creating to ov.serialize(), removed mo.serialize(), small fixes.
* Small fix.
* Small correction.
* Removed coping of params, moved convert implemetation to separate module.
* Import fixes.
* Moved hiding of exceptions to main().
* Updated comment.
* Fixed unit tests.
* Comment changed.
* Fixed dir creating.
* Tests fixed.
* Small fixes.
* Test fix.
* Added meta data generation, removed printing of execution time for silent mode.
* Import fix.
* Conflict fix.
* Fixed error.
* Fix for custom config.
* Added version, data_type params to help.
* Added mo.convert() full-functional tests.
* Small corrections.
* Comment correction.
* Moved convert to openvino package, moved LayotMap and InputCutInfo to openvino.convert.
* Added help param.
* Wrong change removed.
* Small fix.
* Removed unnecessary comments.
* Removed .xml extension check from append_ir_info.
* Added missed file.
* Fixed error.
* Fix for bool value in InputCutInfo.
* Moved InputCutInfo, LayoutMap to openvino.tools.mo.
* Moved InputCutInfo, LayoutMap to openvino.tools.mo.
* Moved check and read_model to emit_ir.
* Small correction.
* Added comment.
* Added unit_tests with convert().
* Small corrections.
* Removed convert alias from openvino.
* Fixed conflicting unit tests.
* Removed unnecessary warnings.
* Params check fix.
* Small correction.
* Added paths checks.
* Added negative tests for to_str methods, fixed errors.
* Added tuples support in input parameter.
* Added direct support of BytesIO and TF1 graph def.
* Moved reminders to update OV and use API 2.0 to main().
* Fixed keras loading.
* Returned .mapping file generating.
* Added positional input_model param.
* Added test for unnamed input_model.
* Optimize imports.
* Added more informative error for brackets syntax in --input.
* Keras direct model support.
* Keras direct model support.
* Small fix.
* Conflict fix.
* Conflict fix.
* Added direct support of BytesIO and TF1 graph def.
* Fixed keras loading.
* Keras direct model support.
* Keras direct model support.
* Small fix.
* Tests for importing from memory.
* Support of other tf/pytorch formats.
* Updated mo_convert extensions tests to use ov models.
* Removed debug output.
* Implemented PyTorch converting logic.
* Small corrections.
* Small corrections.
* Added comments.
* Fixed for single input case.
* Added switching between save to file and BytesIO.
* Small fixes.
* Rename convert() to convert_model().
* Added env variable to disable converting to onnx.
* Tests refactoring.
* Add MO Python API tests to precommit.
* Add MO Python API tests to precommit.
* Added PyTorch to layer tests requirements.
* Added supported formats description.
* Fixed errors, added tests.
* Fixed bugs, added support of numpy and ov.Tensor sample_input.
* Added more torch.Size tests.
* Small correction.
* Renamed sample_input->example_inputs.
* Tests refactoring.
* Code style.
* Added support of dict in example_inputs.
* Small correction.
* Added removing of tmp onnx model in case of conversion error.
* Fix for lists of tensors in example_inputs.
* Support of dynamic axes for Keras layer, Keras module.
* Removed disabling of eager execution.
* Tests fixed.
* Added pytest requirement for layer tests.
* Added convert_model to openvino.runtime, fixed test runs.
* Small fix.
* Tests fix.
* Better help message.
* Error fixed.
* Renamed example_inputs->example_input.
* Small fix.
* Added support of list of layouts.
* Removed wrong change.
* Added tuple support for --layout.
* Removed convert_model from openvino.runtime.
* Use of default onnx opset version.
* Added support of dynamic input shapes without example_input.
* Made better error message.
* Removed stack trace from exceptions.
* Fixed tests.
* Small fix.
* Removed wrong change.
* Added import model from memory tests in unit tests.
* Replaced compare_functions() with MO IR reader compare.
* Removed test.
* Removed not needed change.
* Fixed conflicts.
* [TF FE] Refactor translator for L2Loss and test in the pre-commit
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Use Power for square operation
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Refactor SpaceToBatch and BatchToSpace operations
Make them to support inputs of dynamic rank and shapes
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add layer tests in the pre-commit
* Fix for normalizing padding and crops
* Correct the type of paddings and crops
* Fix incorrect changes for paddings and crops
* Update src/frontends/tensorflow/src/op/space_to_batch_nd.cpp
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* Update src/frontends/tensorflow/src/op/space_to_batch_nd.cpp
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
* [TF FE][Common] Move TF FE to opset Unique and add Unique decomposing to common
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add Unique decomposition transformation into the common part
* Add transformation tests for UniqueDecomposition
* Fix unique_decomposition_test
* Simplify condition of transformation applicability
* Clarify the comment when the transformation is applicable
* Fix transformation test
* Fix transformation test
* Add support of opset10 in IR Reader
* Mark the single element case as xfail
* Fix tensor names in the transformation
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
After fixes for TopK and arithmetic operations for integer tensors, we are ready to switch
these tests in the pre-commit
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Refactor Pad, PadV2, MirrorPad and add layer tests
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Recover translators for DynamicStitch
* Apply code-review feedback and workaround for i32 paddings
* Return required type for convert_pad_mode function
* Work around IR reader limitation with i32 type for Pad
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Refactor translators for Select and SelectV2 and test it
It fixes a case when the condition of a smaller rank than operands in Select
Separately added tests for Select and SelectV2
Do not mix-up Select with Where, so tests for Where are moved to test_tf_Where.py
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Revert extra changes
* Apply code-review feedback: support undefined rank
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
* [TF FE] Refactor translators for Reverse, ReverseV2 and test it
Make these operations reshapeable. Add layer tests for them to the pre-commit
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Apply code-review feedback: simplify checks in Reverse
* Apply the rest of code-review feedback: simplify code for Reverse
* Remove redundant check for axes
* Apply code-review feedback: support dynamic rank
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Add translators for IsInf and IsNan and test it
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add changes in tf_utils
* Apply code-review: add xfail and use of unary op
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Refactor translation for Concat and ConcatV2 operations and add tests
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Correct the layer tests for passing
* Apply code-review feedback: remove redundant function
* Fix a name of function to create Concat model in the layer test
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Remove export API for helper transformation
Also, it skips layer tests for SegmentSum and DynamicPartition in case legacy frontend
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Split test suites for DynamicPartition
* Update CMake to link additional sources for the tests
* Update Cmake to fix unresolved symbol get_message_prefix_tf
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Support Unique operation via transformation
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix other part: place header for UniqueReplacer and test name
* Remove redundant included headers in the transformation test
* Add one more case in the transformation test
* Implement the right way for mapping tensor names
* Apply code-review: rename out_idx, add check for 1D
* Fix unique_replacer test
* Fix typo in the test
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add FunctionsComparator CmpValues ACCURACY to the test
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Support DynamicPartition operation
Add support for DynamicPartition operation and validate it with the layer tests
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add implementation
* Rescale partition indices to provide stable sorting
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* marks tf2 keras tests as precommit for new FE
* adds tf2 layers tests for new FE in precommit
* removes redundant tabulations
* review changes
* fix field name
* fix syntax error
* removes failing tests
* removes failed test
* removes failed test
Remove useless and confusing comments
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* marks specified tests with precommit_tf_fe mark
* adds tf layer tests for new fe into the precommit
* removes redundant tab
* removes redundant tab
* clean-ups
* clean-ups
* change import path for build_graph func
* set path to mo
* set path to mo for PYTHONPATH
* get back imports
* left only CPU runs
* return back skip for LogSoftmax op since it still was not fixed
* adds test for GRUBlockCell op
* convert() method added.
* Moved conversion to convert() method.
* Fixed commits.
* Output dir fix.
* Added objects support for extesions param.
* Added support for transformations_config extension objects.
* Input to str unit tests.
* Added tests, added comments.
* Updated BOM.
* Removed commented code.
* Fixed extension passing.
* Small corrections.
* Fixed for python 3.6.
* Small fix.
* Moved dir creating to ov.serialize(), removed mo.serialize(), small fixes.
* Small fix.
* Small correction.
* Removed coping of params, moved convert implemetation to separate module.
* Import fixes.
* Moved hiding of exceptions to main().
* Updated comment.
* Fixed unit tests.
* Comment changed.
* Fixed dir creating.
* Tests fixed.
* Small fixes.
* Test fix.
* Added meta data generation, removed printing of execution time for silent mode.
* Import fix.
* Conflict fix.
* Fixed error.
* Fix for custom config.
* Added version, data_type params to help.
* Added mo.convert() full-functional tests.
* Small corrections.
* Comment correction.
* Moved convert to openvino package, moved LayotMap and InputCutInfo to openvino.convert.
* Added help param.
* Wrong change removed.
* Small fix.
* Removed unnecessary comments.
* Removed .xml extension check from append_ir_info.
* Added missed file.
* Fixed error.
* Fix for bool value in InputCutInfo.
* Moved InputCutInfo, LayoutMap to openvino.tools.mo.
* Moved InputCutInfo, LayoutMap to openvino.tools.mo.
* Moved check and read_model to emit_ir.
* Small correction.
* Added comment.
* Added unit_tests with convert().
* Small corrections.
* Removed convert alias from openvino.
* Fixed conflicting unit tests.
* Removed unnecessary warnings.
* Params check fix.
* Small correction.
* Added paths checks.
* Added negative tests for to_str methods, fixed errors.
* Added tuples support in input parameter.
* Moved reminders to update OV and use API 2.0 to main().
* Returned .mapping file generating.
* Added positional input_model param.
* Added test for unnamed input_model.
* Optimize imports.
* Added more informative error for brackets syntax in --input.
* Conflict fix.
* Conflict fix.
* Adding Tensorflow2 Keras tests to layer tests
* Fixed usage of use_new_frontend parameter in layer tests of
Tensorflow2 Keras
* Tests changed to use --use_old_api instead of --api_2 argument
* Added copyrights in files
* Added TF2-Keras Activation test to CI check
* refactor of renaming libraries in layer tests
* 1. adds check for old API and new FE usafe
2. refactor of api_2 arg
* fix for tf_NMS test preprocessing
* take libs path from LD_LIBRARY_PATH env
* convert str to Path object
* use wheels path to libs
* print lib paths
* print lib paths
* use ov_frontend_path env
* also check if file to rename exists
* removes redundant prints
* copy instead of rename
* 1. copy instead of rename
2. adds some details to readme
* tf_fe lib renaming to switch to new fe
* Apply suggestions from code review
* 1. implements renaming for win os
2. --api_2 key is equal to True by default
* --ir_version key is equal to '11' by default
* resolves merge conflicts
* check if file to rename exists
Co-authored-by: Evgenya Stepyreva <eva.my.link@gmail.com>
* [TF FE] Fix StridedSlice translator for new_axis vector longer input rank
Currently, new_axis vector is cut by input rank that is correct and leads to the loss of new axes.
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Use int64 type in mask_to_vector function
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [MO] Relax MO upper-bound requirements for TensorFlow and NumPy
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Just debug numpy version
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Pin upper-bounds for NumPy and TensorFlow modules in all reqs files
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update submodule dependency for open_model_zoo
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Install numpy module first
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update NumPy version in POT setup.py
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Extend telemetry tests with a set of possible solutions for events
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix build issue
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update NumPy module version for layer tests
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>