From 0911ca65474afabd4652daf08263555b40e04d34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=9C=A4=ED=98=84=EC=8B=9D/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Principal=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Tue, 21 Aug 2018 17:16:36 +0900 Subject: [PATCH] [PureACL] NEON Relu, Relu1, Relu6 operations (#2384) This commit introduces Relu, Relu1, Relu6 operations. All Relu generated test (except `relu6_quant8_2`) passes. Signed-off-by: Hyun Sik Yoon --- runtimes/pure_arm_compute/src/compilation.cc | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/runtimes/pure_arm_compute/src/compilation.cc b/runtimes/pure_arm_compute/src/compilation.cc index 39976f1..074bf32 100644 --- a/runtimes/pure_arm_compute/src/compilation.cc +++ b/runtimes/pure_arm_compute/src/compilation.cc @@ -2714,7 +2714,13 @@ void Planner::visit(const ::internal::tflite::op::ReLU::Node &node) builder.append("ReLU", std::move(fn)); } else - throw std::runtime_error("Not supported, yet"); + { + auto fn = nnfw::make_unique<::arm_compute::NEActivationLayer>(); + + fn->configure(ifm_alloc, ofm_alloc, act_info); + + builder.append("ReLU", std::move(fn)); + } }; _builder.addStage(stage); @@ -2762,7 +2768,13 @@ void Planner::visit(const ::internal::tflite::op::ReLU1::Node &node) builder.append("ReLU1", std::move(fn)); } else - throw std::runtime_error("Not supported, yet"); + { + auto fn = nnfw::make_unique<::arm_compute::NEActivationLayer>(); + + fn->configure(ifm_alloc, ofm_alloc, act_info); + + builder.append("ReLU1", std::move(fn)); + } }; _builder.addStage(stage); @@ -2810,7 +2822,13 @@ void Planner::visit(const ::internal::tflite::op::ReLU6::Node &node) builder.append("ReLU6", std::move(fn)); } else - throw std::runtime_error("Not supported, yet"); + { + auto fn = nnfw::make_unique<::arm_compute::NEActivationLayer>(); + + fn->configure(ifm_alloc, ofm_alloc, act_info); + + builder.append("ReLU6", std::move(fn)); + } }; _builder.addStage(stage); -- 2.7.4