[mir_onnx] Switch to ReduceMean op (#7003)
authorСергей Баранников/AI Tools Lab /SRR/Engineer/삼성전자 <s.barannikov@samsung.com>
Thu, 29 Aug 2019 21:28:37 +0000 (06:28 +0900)
committerAlexander Efimov/AI Tools Lab/./Samsung Electronics <a.efimov@samsung.com>
Thu, 29 Aug 2019 21:28:37 +0000 (00:28 +0300)
Switch from `ReduceOp` to `ReduceMeanOp`. The former one is deprecated.

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-onnx-importer/Op/ReduceMean.cpp

index 28065ce..bb717d8 100644 (file)
@@ -19,7 +19,7 @@
 #include "ONNXHelpers.h"
 #include "AttributeHelpers.h"
 
-#include "mir/ops/ReduceOp.h"
+#include "mir/ops/ReduceMeanOp.h"
 
 #include <numeric>
 
@@ -61,9 +61,8 @@ void ReduceMeanNodeConverter::convertV1(const onnx::NodeProto &onnx_node,
   bool keep_dims = static_cast<bool>(keepdims);
 
   mir::Graph *graph = context->getGraph();
-  auto result = createOp<mir::ops::ReduceOp>(graph, inputs[0], reduce_dims, keep_dims,
-                                             mir::ops::ReduceOp::FuncType::mean)
-                    ->getOutput(0);
+  auto result =
+      createOp<mir::ops::ReduceMeanOp>(graph, inputs[0], reduce_dims, keep_dims)->getOutput(0);
 
   context->setNodeOutputs(onnx_node, {result});
 }