openvino/model-optimizer/extensions/middle
Maxim Vafin f1811ad060
Implement support for opset3 EmbeddingBag ops (#546)
* [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>
2020-06-08 18:06:40 +03:00
..
AddFakeQuantizeFuse.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
AddIsCyclicAttribute.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
AddIsCyclicAttribute_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
AddMeanScaleValues.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
AddMeanScaleValues_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
AnchorToPriorBox.py publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
ApplyNHWCtoNCHWpermutation.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ApplyPermutations.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
ArgMaxToTopK.py publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
AttributedTileNormalizer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
BiasAddBroadcasting.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
BinarizeWeightsM1P1.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
BlockLSTMtoLSTMSequence.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
CheckForCycle.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
CheckForCycle_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ConcatOptimization.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
ConcatOptimization_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
ConstSwitchResolver.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
ConvToBinaryConv.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ConvertGroupedStridedSlice.py MO fails generating IR from XLNET model due to a bug in the transformation ConvertGroupedStridedSlice (#625) 2020-05-29 21:01:09 +03:00
ConvertGroupedStridedSlice_test.py MO fails generating IR from XLNET model due to a bug in the transformation ConvertGroupedStridedSlice (#625) 2020-05-29 21:01:09 +03:00
ConvertLayoutDependentOperations.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ConvertMultiInputConv.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
CustomSubgraphCall.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
CutInputHavingZeroDimFromConcat.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
CutInputHavingZeroDimFromConcat_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
DecomposeBias.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
DecomposeBidirectionalRNNSequence.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
Deconvolution3rdInputNormalization.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
DeleteControlFlowEdges.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
DeleteNotExecutable.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
DepthToSpace.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
DilatedConvolution.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
EltwiseChecker.py publish master branch snapshot, revision 8d31237e2c3f673cbb0f0ba110fc10f5cce1d2bb 2020-05-22 02:23:12 +03:00
EltwiseInputNormalization.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
EltwiseInputNormalization_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
EltwiseInputReshape.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
EltwiseInputReshape_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FakeSplitOutputs.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FakeSplitOutputs_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FuseReshapesSequence.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FusedBatchNormNonConstant.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FusedBatchNormTraining.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
FusedBatchNormTraining_test.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
GRURNNSequenceToTensorIterator.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
GatherNdNormalizer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
GroupNorm.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
InputCut.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
InsertLayoutPropagationTransposes.py publish master branch snapshot, revision 0110d9c98fd7209589d06344f0d836f61d81f4b3 2020-04-27 21:21:29 +03:00
InsertSelect.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
InsertSelect_test.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
InterpolateSequenceToInterpolate.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
InterpolateSequenceToInterpolate_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
L2NormToNorm.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
L2NormToNorm_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
LSTMRNNSequenceToTensorIterator.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
LayoutChangeForConstantShapePaths.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
LeakyReluPattern.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
MXNetRNNSequenceNormalize.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
MXNetSplitMultiLayers.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
MXTileReplacer.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
MXTileReplacer_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
MarkSubgraphsWithCorrectLayout.py publish master branch snapshot, revision 0110d9c98fd7209589d06344f0d836f61d81f4b3 2020-04-27 21:21:29 +03:00
MinimumMiddleReplacer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
MinumumMiddleReplacer_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
MulAddToSS.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
MulFakeQuantizeFuse.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
MulQuantizeFuse_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
NasNet.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
ONNXRNNSequenceNormalize.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
PartialInfer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RNNSequenceNormalizeToIE.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ReluQuantizeFuse.py Support ONNX Clamp-11 (#538) 2020-05-25 19:59:07 +03:00
ReluQuantizeFuse_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
RemoveDuplicationMemory.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RemoveDuplicationMemory_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
RemoveIdentity.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RemoveRedundantReshapeAfterCropAndResize.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RemoveRedundantReshapes.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RemoveUselessConcatSplit.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
RemoveUselessConcatSplit_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
RemoveUselessCrops.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
RemoveUselessCrops_test.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
RemoveUselessPad.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
RemoveUselessPad_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
ReplaceMemoryOffsetWithSplice.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
ReplaceMemoryOffsetWithSplice_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
ReplacePNorm.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ReplacePNormNodePattern_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
ReplaceSpliceNodePattern.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
ReplaceSpliceNodePattern_test.py publish master branch snapshot, revision ea98a886d925eb152931aab13856e68037665562 2020-05-22 03:42:00 +03:00
ReverseTransposeNormalization.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ReverseV2ToReverseSequence.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ScaleInput.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
ScaleInput_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
SharedWeightsDuplication.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
SharedWeightsDuplication_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
SliceConvert_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
SliceConverter.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
SliceLikeToStridedSlice.py publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
SliceLikeToStridedSlice_test.py publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
SplitConcatPairToInterpolate.py SplitConcatPairToInterpolate inserts Interpolate when input is 2D (#596) 2020-05-28 18:08:24 +03:00
SplitConcatPairToInterpolate_test.py SplitConcatPairToInterpolate inserts Interpolate when input is 2D (#596) 2020-05-28 18:08:24 +03:00
SwapAxesMiddleReplacer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
TF_lstm_cell_to_generic.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
TensorIteratorBackEdge.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorBackEdge_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorCondition.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
TensorIteratorConditionChecker.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
TensorIteratorCondition_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorInput.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
TensorIteratorInput_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorLSTMToLSTMSequence.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorMerge.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIteratorOutput.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
TensorIteratorOutput_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
TensorIterator_utils.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
UnsqueezeTileReshapeBlockToInterpolate.py publish master branch snapshot, revision 0110d9c98fd7209589d06344f0d836f61d81f4b3 2020-04-27 21:21:29 +03:00
UnsqueezeTileReshapeBlockToInterpolate_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
UpsampleToResample.py publish master branch snapshot, revision 9df5eb1f84e13a35720a918f88324561222ab114 2020-05-20 01:13:06 +03:00
UpsampleToResample_test.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
UselessMerge.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
UselessSplitEraser.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
__init__.py Publishing R3 2018-10-16 13:45:03 +03:00
fusings.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
pass_separator.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
permute_tensor_iterator.py Publishing 2020.2 content 2020-04-13 21:17:23 +03:00
preprocessing.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
quantize_fuses.py publish master branch snapshot, revision 8d31237e2c3f673cbb0f0ba110fc10f5cce1d2bb 2020-05-22 02:23:12 +03:00
quantize_fuses_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
reverse_tensor_iterator.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
space_to_depth.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00
sparse_reshape.py Implement support for opset3 EmbeddingBag ops (#546) 2020-06-08 18:06:40 +03:00
sparse_reshape_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
ssd_anchors_to_const.py publish master branch snapshot, revision 49482ae3bea0cbaa07474f86f36db11943142687 2020-05-13 21:12:22 +03:00
weights_permute_normalizer_test.py publish master branch snapshot, revision cdcab9d7ab48ffb0ee5629fabbfa06cb45debd9b 2020-04-15 19:01:57 +03:00
wights_permute_normalizer.py Publishing 2020.1 content 2020-02-11 22:48:49 +03:00