summaryrefslogtreecommitdiff
path: root/runtimes
diff options
context:
space:
mode:
author오형석/On-Device Lab(SR)/Staff Engineer/삼성전자 <hseok82.oh@samsung.com>2019-04-01 09:37:29 +0900
committer박세희/On-Device Lab(SR)/Principal Engineer/삼성전자 <saehie.park@samsung.com>2019-04-01 09:37:29 +0900
commite1dd2c7930ea6ad527e6af6fa28c16465e037d8c (patch)
tree13ef48de3eccce9053474c52ac8b81b138d9aaef /runtimes
parentd3de696de855d0293b477ddcf12d02764166d16a (diff)
downloadnnfw-e1dd2c7930ea6ad527e6af6fa28c16465e037d8c.tar.gz
nnfw-e1dd2c7930ea6ad527e6af6fa28c16465e037d8c.tar.bz2
nnfw-e1dd2c7930ea6ad527e6af6fa28c16465e037d8c.zip
Introduce cpu maxpool kernel (#4897)
Introduce cpu maxpool kernel from tflite Use kernel in neurun cpu backend Signed-off-by: Hyeongseok Oh <hseok82.oh@samsung.com>
Diffstat (limited to 'runtimes')
-rw-r--r--runtimes/neurun/backend/cpu/kernel/MaxPoolLayer.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/runtimes/neurun/backend/cpu/kernel/MaxPoolLayer.cc b/runtimes/neurun/backend/cpu/kernel/MaxPoolLayer.cc
index e62ee9de3..84071bfad 100644
--- a/runtimes/neurun/backend/cpu/kernel/MaxPoolLayer.cc
+++ b/runtimes/neurun/backend/cpu/kernel/MaxPoolLayer.cc
@@ -16,7 +16,8 @@
#include "MaxPoolLayer.h"
-#include "tensorflow/contrib/lite/kernels/internal/optimized/optimized_ops.h"
+#include <cker/operation/MaxPool.h>
+
#include "OperationUtils.h"
namespace neurun
@@ -29,7 +30,7 @@ namespace kernel
{
#define MAXPOOLING_PARAMETERS \
- tflite::PoolParams op_params; \
+ nnfw::cker::MaxPoolParams op_params; \
op_params.stride_height = _strideHeight; \
op_params.stride_width = _strideWidth; \
op_params.filter_height = _kernelHeight; \
@@ -54,8 +55,8 @@ bool MaxPoolLayer::maxPoolFloat32()
op_params.float_activation_min = output_activation_min;
op_params.float_activation_max = output_activation_max;
- ::tflite::optimized_ops::MaxPool(op_params, convertShapeToTFLiteShape(_inputShape), _inputData.f,
- convertShapeToTFLiteShape(_outputShape), _outputData.f);
+ nnfw::cker::MaxPool(op_params, convertShapeToCkerShape(_inputShape), _inputData.f,
+ convertShapeToCkerShape(_outputShape), _outputData.f);
return true;
}
bool MaxPoolLayer::maxPoolQuant8()
@@ -68,8 +69,8 @@ bool MaxPoolLayer::maxPoolQuant8()
op_params.quantized_activation_min = output_activation_min;
op_params.quantized_activation_max = output_activation_max;
- ::tflite::optimized_ops::MaxPool(op_params, convertShapeToTFLiteShape(_inputShape), _inputData.u8,
- convertShapeToTFLiteShape(_outputShape), _outputData.u8);
+ nnfw::cker::MaxPool(op_params, convertShapeToCkerShape(_inputShape), _inputData.u8,
+ convertShapeToCkerShape(_outputShape), _outputData.u8);
return true;
}