diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-11-20 16:17:48 +0000 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2020-11-20 18:05:50 +0000 |
commit | 1672542bcbfdffadef15f7e844236a1a3da089b5 (patch) | |
tree | ef228d88eff5b4e373d2b6c24f040b0d0a4c1c29 /delegate/src/Convolution.hpp | |
parent | 56870183198842be1706562d8386f4e5f534e9b6 (diff) | |
download | armnn-1672542bcbfdffadef15f7e844236a1a3da089b5.tar.gz |
IVGCVSW-5538 Fix delegate DepthwiseConv2d, DIV, Reshape
* Correct filter shape for DepthwiseConv2d
* Remove non-support data type
* Allow check for flatten on Reshape
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Ic4be63d7c2f3a2b5e13a1530025a49464c21171b
Diffstat (limited to 'delegate/src/Convolution.hpp')
-rw-r--r-- | delegate/src/Convolution.hpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/delegate/src/Convolution.hpp b/delegate/src/Convolution.hpp index fed084e3a9..2d9fdba122 100644 --- a/delegate/src/Convolution.hpp +++ b/delegate/src/Convolution.hpp @@ -340,6 +340,13 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData, biasTensorInfo = armnn::TensorInfo(armnn::TensorShape({1}), GetDataType(tfLiteInputTensor)); } + std::vector<uint8_t> swizzledData(filterTensorInfo.GetNumBytes()); + auto filter = + CreateConstTensor(&tfLiteFilterTensor, + filterTensorInfo, + armnn::Optional<armnn::PermutationVector&>(permutationVector), + swizzledData.data()); + if (!delegateData.m_Network) { bool isSupported = false; @@ -351,18 +358,13 @@ TfLiteStatus VisitDepthwiseConv2dOperator(DelegateData& delegateData, inputTensorInfo, outputTensorInfo, descriptor, - filterTensorInfo, + filter.GetInfo(), armnn::Optional<armnn::TensorInfo>(biasTensorInfo)); return isSupported ? kTfLiteOk : kTfLiteError; } armnn::IConnectableLayer* layer = nullptr; - std::vector<uint8_t> swizzledData(filterTensorInfo.GetNumBytes()); - auto filter = - CreateConstTensor(&tfLiteFilterTensor, - filterTensorInfo, - armnn::Optional<armnn::PermutationVector&>(permutationVector), - swizzledData.data()); + if(biasEnabled) { auto biases = |