* Added Caffe Slice_ext
* Added TFSlice, AttributedSlice (both with extractors and replacers), corrected SliceConverter and added unittests for all cases
* added comments to each type of Slice operation; optimized shape inference; moved mxlice inside of slice.py; renamed slice_replacers
* removed type annotation for get_shape_after_slice routine
* replaced zeros_like with zeros
* Corrected preserving node names, renamed attributes names, added tests fro slice_replacer onnx phase
* Renamed slice_replacers.py
* added more unittest cases
* added type annotations, moved to more relevant place routines for shape calculation, and some other minor corrections
* corrected a typo `normalize_slice_indices` comment
* corrected shape calculation for Nonconstant inputs
* corrected a few typos
* corrected type declarations
* corrected shape inference with rounding
* refactored unit-tests for front transforms of Slice
* added error raising for negative and zero shapes
* removed magic_num
* corrected AttributedSlice, clarified comments
* fixed unit-test for AttributedSliceToSlice
* typo in type hints corrected
* removed supported_attrs
* returned back default None for attrs of Slice
* 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
SparseToDense used in Wide and Deep model is expressed through ScatterND operation.
ScatterND is more functional than SparseToDense. Hence, it was decided to replace SparseToDense
with ScatterND. ScatterND is more useful for other models.
Remove SparseToDense from the previous opset
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Specification for the NMS-4 operation (updated shape infer function)
* Enabled NMS-4 in the Model Optimizer
* Changed opset version for NMS with dynamic outputs and namespace to be "dynamic"
* Added NMS-4
* Added opset4 to the nGraph
* Added unit tests for NMS-4 type infer
* Renamed UpgradeNMS3ToNMS4 to UpgradeNMS3ToNMSDynamic. Added stub for ConvertNMS4ToLegacy
* Make IE aware of opset4 ops
* Updated NMSIE to have different shape infer function based on the NMS it was converted from. Implemented NMS4->NMSIE conversion
* Apply code style
* Updated StaticShapeNonMaximumSuppression op in the VPU
* Introduced new version of NMSIE operation with shape infer function from v4::NMS
* Fixed dynamicToStaticNonMaxSuppression transformation
* Added new version of NMSIE op with updated shape infer function
* Fixed NMS4 to NMSIE2 transformation
* Fixed constructors for nGraph ops v4::NM and dynamic::NMS
* Updated text in the opset4 specification document
* Code style fixes
* Fixed constructors for StaticShapeNMS + fixed test
* Minor change to the NMS op in the MO
* Fixed typo in the dynamic_to_static_shape_non_max_suppression transformation
* Removed redundant checks
* Refactored NMS infer and validate functions
* Added more checks to the validate_and_infer_types functions for NMS-3 and NMS-4
* Fixed compilation issue on Windows for op NMS
* Code style fixes
* Fixed typos in the NMSIE and NMSIE2 to CNNLayer op conversion
* Fixed typo in the ie_cnn_layer_builder_ngraph.cpp
* Fixed the NMSToLegacyNMS transformation. Added unit tests
* Apply code review comments
* Refactored NMSIE to use visitors
* Removed calling ConvertNMS4ToLegacy in the common optimizations
* Moved NMS4ToNMSLegacy to convert1_to_legacy group of transformations
* Removed useless include statement
* Removed copy-paste issue
Co-authored-by: Evgeny Lazarev <elazarev.nnov@gmail.com>
* Fixed deleting Transpose layers after and before Interpolate layers.
* Added run_after() for the transformation InterpolateTranspose.
* Some checks were moved from the replacement function to the pattern.
* Added a check of the attribute 'axes' into the pattern.
* LayerNorm(PyTorch/HuggingFace pattern)->MVN+Mul+Add. Improves perf on BERT by 5%
* deducing the across_channels from axes passed to the MVN op.
axes are normalized. if no axes is specified, falling back to the (previously) default across_channel value
Co-authored-by: myshevts <maim.y.shevtsov@intel.com>
* 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
* [MO] Implement EmbeddingBag_3
* Transform dynamic sub-graph of Wide and Deep into EmbeddingSegmentsSum
- Expressed SparseWeightedSum sub-graph through EmbeddingSegmentsSum
- Removed experimental SparseWeightedSum layer
- Implemented tests for the transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix EmbeddingBag shape infer
* Fix EmbeddingSegmentsSum transformation for Wide and Deep
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix EmbeddingSegmentSum replacer after ports swap
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Update package_BOM.txt
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Add unit tests for EmbeddingXXX shape infer
* Fix ATen resolver
* Remove deleted files from BOM
* Add opset version to embedding_bag
* Use base class for EmbeddingBag
* Fix per_sample_weights case
* Fix EmbeddingSegmentsSum transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix EmbeddingBag checks
* Fix ATen front transformation and merge conflicts
* Fix BOM
* Work around limitation for I64 input of W&D model
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Cleanup where operation to fix affect of WhereDecomposition transform
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix BOM
* Correct EmbeddingSegmentSum transform for Wide and Deep
Add casting segment ids to i32 and remove ConstToResult sub-graph.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Update BOM with RemoveConstToResult transform
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Add more comments for RemoveConstToResult transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Remove useless logging in EmbeddingSegmentsSum transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Small fixes
* Move EmbeddingBag resolving back to front phase
* Improve error messages
* Fix typo in unittests
* Reimplement sparse_reshape middle transform
Avoid deprecated API.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Clean-up graph after sparse_reshape and ConstToResult transformation
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix clean-up for transformations
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
* Fix clean-up for transformation #2
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
WhereDecomposition transform is applied to Where operation in for-garbage sub-graph remained after SparseWeightedSum transform.
Signed-off-by: Roman Kazantsev <roman.kazantsev@intel.com>