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

Signed-off-by: Sergei Barannikov <s.barannikov@samsung.com>
compiler/mir-tflite-importer/tflite_op_creator.cpp
compiler/mir-tflite-importer/tflite_op_creator.h

index 4474ca9..f74696d 100644 (file)
@@ -31,7 +31,7 @@
 #include "mir/ops/MulOp.h"
 #include "mir/ops/PadOp.h"
 #include "mir/ops/PoolOp.h"
-#include "mir/ops/ReduceOp.h"
+#include "mir/ops/ReduceMeanOp.h"
 #include "mir/ops/ReluOp.h"
 #include "mir/ops/ReshapeOp.h"
 #include "mir/ops/ResizeOp.h"
@@ -379,8 +379,7 @@ TFLiteOpCreator::convertMean(const ::tflite::ReducerOptions *opts,
   mir::Tensor<int32_t> axes_tensor(extractTensor(inputs.at(1)));
 
   std::vector<int32_t> axes = convertIntTensorToVector<int32_t>(axes_tensor);
-  auto result =
-      createOp<ops::ReduceOp>(input, axes, opts->keep_dims(), ops::ReduceOp::FuncType::mean);
+  auto result = createOp<ops::ReduceMeanOp>(input, axes, opts->keep_dims());
   return {result->getOutput(0)};
 }
 
index abe997e..058ebd7 100644 (file)
@@ -20,7 +20,6 @@
 #include "schema_generated.h"
 
 #include "mir/ops/CommonProps.h"
-#include "mir/ops/ReduceOp.h"
 #include "mir/Graph.h"
 #include "mir/TensorVariant.h"
 #include "mir/Shape.h"