Enable ReduceL1 and ReduceL2 operations (#1799)
authorEvgeny Lazarev <evgeny.lazarev@intel.com>
Mon, 17 Aug 2020 13:32:53 +0000 (16:32 +0300)
committerGitHub <noreply@github.com>
Mon, 17 Aug 2020 13:32:53 +0000 (16:32 +0300)
commit125a4624009674ca4d84bf68078d48ba97228000
tree0b907c88fa29f99558c71f4ea4525776fbd24194
parent7c9815b4c12d80eb60bf4928297c0cadd67dafe4
Enable ReduceL1 and ReduceL2 operations (#1799)

* Initial version of ReduceL1, ReduceL2 and ReduceLp enabling in the MO

* Added operations ReduceL1 and ReduceL2 to nGraph

* Removed ReduceLp. Added ReduceL1 and ReduceL2

* Separated specification of ReduceLp into ReduceL1 and ReduceL2

* Updated ReduceL1 and ReduceL2 specification

* Fixed ReduceL1 and ReduceL2 type prop tests

* Implemented nGraph transformation to decompose ReduceL1 and ReduceL2. Disabled them for CPU and GPU plugins

* Updated supported framework layers

* Added unit tests for ReduceL1 and ReduceL2 reference implementation

* Fixed ReduceXXX operations reference implementation by adding support for a new parameter 'keep_dims'

* Fixed constant folding for v0::Any

* Added ReduceL1 and ReduceL2 to Python API

* Implemented ReduceL1 and ReduceL2 decomposition tests and fixed ReduceL2 decomposition

* Added specific creator for ReduceXXX operations instead of NodeBuilders

* Fixed conversion ReduceXXX to CNNLayer

* Fixed parser for ReduceLogicalXXX operations
73 files changed:
docs/MO_DG/prepare_model/Supported_Frameworks_Layers.md
docs/ops/opset4.md
docs/ops/reduction/ReduceL1_4.md [moved from docs/ops/reduction/ReduceLp_4.md with 76% similarity]
docs/ops/reduction/ReduceL2_4.md [new file with mode: 0644]
inference-engine/src/cldnn_engine/cldnn_engine.cpp
inference-engine/src/legacy_api/src/convert_function_to_cnn_network.cpp
inference-engine/src/legacy_api/src/ie_cnn_layer_builder_ngraph.cpp
inference-engine/src/mkldnn_plugin/mkldnn_plugin.cpp
inference-engine/src/readers/ir_reader/ie_ir_parser.cpp
inference-engine/src/transformations/include/transformations/reduce_l1_decomposition.hpp [new file with mode: 0644]
inference-engine/src/transformations/include/transformations/reduce_l2_decomposition.hpp [new file with mode: 0644]
inference-engine/src/transformations/src/transformations/convert_opset1_to_legacy/convert_opset1_to_legacy.cpp
inference-engine/src/transformations/src/transformations/reduce_l1_decomposition.cpp [new file with mode: 0644]
inference-engine/src/transformations/src/transformations/reduce_l2_decomposition.cpp [new file with mode: 0644]
inference-engine/tests/functional/inference_engine/transformations/reduce_l1_decomposition_test.cpp [new file with mode: 0644]
inference-engine/tests/functional/inference_engine/transformations/reduce_l2_decomposition_test.cpp [new file with mode: 0644]
model-optimizer/automation/package_BOM.txt
model-optimizer/extensions/back/ReduceMerge.py [moved from model-optimizer/extensions/back/ReduceToPooling.py with 100% similarity]
model-optimizer/extensions/back/TransposeReduceFusing.py
model-optimizer/extensions/front/ReduceL2Decomposition.py [deleted file]
model-optimizer/extensions/front/ReduceL2Decomposition_test.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_ext.py [new file with mode: 0644]
model-optimizer/extensions/front/onnx/reduce_l2_ext.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_max_ext.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_mean_ext.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_min_ext.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_prod_ext.py [deleted file]
model-optimizer/extensions/front/onnx/reduce_sum_ext.py [deleted file]
model-optimizer/extensions/front/reduce_axis_normalizer.py
model-optimizer/extensions/front/tf/reduce_ext.py
model-optimizer/extensions/ops/ReduceOps.py
model-optimizer/extensions/ops/ReduceOps_test.py
ngraph/core/include/ngraph/op/reduce_l1.hpp [new file with mode: 0644]
ngraph/core/include/ngraph/op/reduce_l2.hpp [new file with mode: 0644]
ngraph/core/include/ngraph/ops.hpp
ngraph/core/include/ngraph/opsets/opset4_tbl.hpp
ngraph/core/include/ngraph/runtime/reference/any.hpp
ngraph/core/include/ngraph/runtime/reference/autobroadcast_binop.hpp
ngraph/core/include/ngraph/runtime/reference/broadcast.hpp
ngraph/core/include/ngraph/runtime/reference/logical_reduction.hpp
ngraph/core/include/ngraph/runtime/reference/max.hpp
ngraph/core/include/ngraph/runtime/reference/mean.hpp
ngraph/core/include/ngraph/runtime/reference/min.hpp
ngraph/core/include/ngraph/runtime/reference/product.hpp
ngraph/core/include/ngraph/runtime/reference/reduce_l1.hpp [new file with mode: 0644]
ngraph/core/include/ngraph/runtime/reference/reduce_l2.hpp [new file with mode: 0644]
ngraph/core/include/ngraph/runtime/reference/softmax.hpp
ngraph/core/include/ngraph/runtime/reference/sum.hpp
ngraph/core/include/ngraph/shape_util.hpp
ngraph/core/src/op/max.cpp
ngraph/core/src/op/min.cpp
ngraph/core/src/op/product.cpp
ngraph/core/src/op/reduce_l1.cpp [new file with mode: 0644]
ngraph/core/src/op/reduce_l2.cpp [new file with mode: 0644]
ngraph/core/src/op/reduce_logical_and.cpp
ngraph/core/src/op/reduce_logical_or.cpp
ngraph/core/src/op/reduce_mean.cpp
ngraph/core/src/op/reduce_prod.cpp
ngraph/core/src/op/reduce_sum.cpp
ngraph/core/src/op/sum.cpp
ngraph/core/src/pass/constant_folding_arithmetic_reduction.cpp
ngraph/core/src/pass/constant_folding_logical_reduction.cpp
ngraph/core/src/shape_util.cpp
ngraph/python/src/ngraph/__init__.py
ngraph/python/src/ngraph/opset4/__init__.py
ngraph/python/src/ngraph/opset4/ops.py
ngraph/test/CMakeLists.txt
ngraph/test/op_eval/reduce_l1.cpp [new file with mode: 0644]
ngraph/test/op_eval/reduce_l2.cpp [new file with mode: 0644]
ngraph/test/partial_shape.cpp
ngraph/test/runtime/interpreter/int_executable.hpp
ngraph/test/type_prop/reduce_l1.cpp [new file with mode: 0644]
ngraph/test/type_prop/reduce_l2.cpp [new file with mode: 0644]