diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2020-11-13 17:51:56 +0000 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2020-11-16 10:08:49 +0000 |
commit | 32ca144fc8b4f0a1e2eda274da55ffd0a6016c02 (patch) | |
tree | 774754819eb4a01ed21be1166e60fa79dce8899d /delegate/src/Pooling.hpp | |
parent | 33d2c785c01c682c6a32e0de34088729f7593c19 (diff) | |
download | armnn-32ca144fc8b4f0a1e2eda274da55ffd0a6016c02.tar.gz |
IVGCVSW-5338 TfLiteDelegate: Implement the Convolution operators
* Add Convolution, DepthwiseConvolution and TransposeConvolution
Signed-off-by: Kevin May <kevin.may@arm.com>
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I797e42844dfee0cc80beb64eabc3111b96320daf
Diffstat (limited to 'delegate/src/Pooling.hpp')
-rw-r--r-- | delegate/src/Pooling.hpp | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/delegate/src/Pooling.hpp b/delegate/src/Pooling.hpp index b3a2af8900..07c1946d73 100644 --- a/delegate/src/Pooling.hpp +++ b/delegate/src/Pooling.hpp @@ -5,6 +5,8 @@ #pragma once +#include "DelegateUtils.hpp" + #include <tensorflow/lite/builtin_ops.h> #include <tensorflow/lite/c/builtin_op_data.h> #include <tensorflow/lite/c/common.h> @@ -13,29 +15,6 @@ namespace armnnDelegate { -void CalcPadding(uint32_t inputSize, - uint32_t filterSize, - uint32_t stride, - uint32_t dilation, - uint32_t& paddingFront, - uint32_t& paddingBack, - TfLitePadding padding) -{ - paddingFront = 0; - paddingBack = 0; - if (padding == kTfLitePaddingSame) - { - uint32_t outputSize = (inputSize + stride - 1) / stride; - uint32_t dilatedSize = filterSize + (dilation - 1) * (filterSize - 1); - uint32_t temp = (outputSize - 1) * stride + dilatedSize; - if (temp > inputSize) - { - paddingFront = (temp - inputSize) / 2; - paddingBack = (temp - inputSize) - paddingFront; - } - } -} - TfLiteStatus VisitPoolingOperator(DelegateData& delegateData, TfLiteContext* tfLiteContext, TfLiteNode* tfLiteNode, |