This pull request adds support for the TensorFlow "**MatrixInverse**"
operation to OpenVINO's TensorFlow Frontend (TF FE). It implements a new
loader function translate_matrix_inverse_op that translates the
TensorFlow operation into the equivalent OpenVINO Inverse operation
(from opset-14) for both real-valued and complex-valued inputs.
Addresses issue:
#[22957](https://github.com/openvinotoolkit/openvino/issues/22957)
Hi Roman @rkazants, could you please review my work, thank you!
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- Extends support for CumSum operation to complex types
- Addresses issue #22949
---------
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Extending support for BiasAdd operation to complex tensors.
Resolves Issue: #22945
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
### Details:
- extended addN.cpp file to support complex tensor
- extended test_tf_addN.py with test for complex input
### Tickets:
- #22944
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- *Adding support for OnesLike operation on complex type tensor*
- Closes#22953
---------
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- *Extended loader Reciprocal by propagating ComplexTypeMark from input
to output and to represent output complex type tensor as a
floating-point type tensor with an auxiliary dimension that concatenates
real and imaginary parts of complex tensor.*
- *Performed reciprocal for complex numbers.*
- *Wrapped the complex result with ComplexTypeMark and returned the
result*
### Tickets:
- #23234
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Closes https://github.com/openvinotoolkit/openvino/issues/22955
### Details:
- separate input into real and imaginary parts and handle them
separately by padding real or imag parts of padding value to them and
concatenate them finally.
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
New PR due to merge
conflicts(https://github.com/openvinotoolkit/openvino/pull/22917)
Updated the copyright year from 2018-2023 to 2018-2024 in all openvino
files
Ref. to script: CVS-101144
Command used:
```bash
git grep -lz '2018-2023 Intel Corporation' | xargs -0 sed -i '' -e 's/2018-2023 Intel Corporation/2018-2024 Intel Corporation/g'
```
### Details:
- *Extended loader ADDV2 by propagating ComplexTypeMark from input to
output and to represent output complex type tensor as a floating-point
type tensor with an auxiliary dimension that concatenates real and
imaginary parts of complex tensor.*
- *Performed addition for complex numbers.*
- *Wrapped the complex result with ComplexTypeMark and returned the
result*
Fixes#22946
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- Added support for complex tensors and tests for it.
### Tickets:
- #23244
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- Add complex type support for rank op
- Add corresponding test of it
### Tickets:
- I think I don't have a ticket id
### Related issues
#22956
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
**Details:** `MatrixBandPart` is needed to support Keras StableDiffusion
model. This is reserved PR for
https://github.com/openvinotoolkit/openvino/pull/22447
**Ticket:** CVS-133786
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: himanshugupta11002 <72141497+himanshugupta11002@users.noreply.github.com>
### Details:
- Centernet's topk operation returns large int32 values (greater than
1000000), even though they are integer `FloorDiv`/`Div(inp_1, inp_2) +
Floor` operation is performed in float16 and because of that it causes
accuracy problems.
- To solve this need to performs FloorDiv operation in integer with a
subgraph:
```
res = x / y; if x > 0 and y > 0
res = x / y - 1; if (x < 0 xor y < 0) and (x mod y != 0)
```
- checked on separate bus: no degradations caused.
### Tickets:
- CVS-130526
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
### Details:
- Move validation_util.hpp under `openvino/core` to include it same way
as others OV code
`#include "openvino/core/validation_util.hpp"`
### Tickets:
- [CVS-131972](https://jira.devtools.intel.com/browse/CVS-131972)
* Conjugate
* Moved common logic into make_conj helper.
* Update src/frontends/tensorflow_common/src/op/conj_transpose.cpp
* Moved helper to conj_transpose
* Applied helper to both conj and conj_transpose
* Deleted conj.cpp
* Update src/frontends/tensorflow_common/src/op/conj_transpose.cpp
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Update src/frontends/tensorflow_common/src/op/conj_transpose.cpp
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Removed additional Shape:: scope resolution from get_conj helper
* Added Conj and ConjugateTranspose to supported ops
* Update src/frontends/tensorflow/src/op_table.cpp
Change "Conjugate" to "Conj"
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Apply suggestions from code review
* Removed perms call and moved test data directly to parametrize macro
* Apply suggestions from code review
* Apply suggestions from code review
* Changed input types from float32 to complex64
* Changed input type back to np.float32 and removed real tensor test
* Update src/frontends/tensorflow_common/src/op/conj_transpose.cpp
---------
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
* [TF FE] Support LookupTableFindV2 for integer keys
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update src/frontends/tensorflow/include/openvino/frontend/tensorflow/variable.hpp
* Update src/frontends/tensorflow/src/hash_table.hpp
* Update src/frontends/tensorflow/src/op/lookup_table_find.cpp
* Fix build
* Override get_value for HashTable
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix translator for lookup_table_find
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update lookup_table_find to support unsorted keys with holes
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Test both HashTable v1 and v2
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Remove use of heavy opset header in unit-tests
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Apply suggestions from code review
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Support mutable tensors produced by variables and resources
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update documentation
* Fix build and move variable.hpp to public
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add missing variable.hpp header file
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add layer tests for Assign operations
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add translators for AssignVariable operations
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Document new operations
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add layer tests for AssignVariableOps
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix build
* Fix code-style issue
* Update src/frontends/tensorflow/include/openvino/frontend/tensorflow/node_context.hpp
* Update src/frontends/tensorflow/include/openvino/frontend/tensorflow/variable.hpp
* Update src/frontends/tensorflow/include/openvino/frontend/tensorflow/variable.hpp
* Update src/frontends/tensorflow/src/op/assign.cpp
* Update src/frontends/tensorflow/src/op/assign_add.cpp
* Update src/frontends/tensorflow/src/op/assign_sub.cpp
* Do not change node name for read_variable_op
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Make assign_variable_op backward-compatible
* Fix layer tests to run them in parallel
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix testing model
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Implement native support of string tensors for TensorFlow models
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update unit-test for model with string tensor
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update graph comparator for string Constant comparison
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Update unit-test
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add layer tests for string tensor
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [MO][TF FE] Switch off fallback to legacy FE
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Support complex condition for TF While
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Support TensorArrayV3 of a dynamic size
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Test TensorArrayV3 of dynamic size
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE][GitHub issue] Extend Upsampling2D support for more input types
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Fix output type
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Move infer_convolution_forward to dev API
* Move infer_auto_padding to dev API
* Move evaluate_as_partial_shape to dev API
* Move default_label_evaluator to dev API
* Move generate_transpose_default_order to dev API
* Move is_valid_axes_order to dev API
* Move has_no_labels to dev API
* Remove usage of legacy get_constant_from_source
from core and transformations
* Move normalize_axes to dev API
* Move normalize_axis to dev API
* Deprecate functions to be removed later
* [TF FE] Support object removal and Pad for complex type
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Add test for Pad on complex type
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* [TF FE] Speed up compilation - part 5
Avoid usage of heavy opsetX header
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Complete constant.hpp template methods for string Tensor
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
* Revert "Complete constant.hpp template methods for string Tensor"
This reverts commit 8f86ab2e7b.
---------
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>