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:06:44 +0000 |
commit | 8c2f651ad454d11dd36e212560af23dbea5b758e (patch) | |
tree | 1b5d6134d1242a40d2396db3304525bccbe17700 /delegate/src/Redefine.hpp | |
parent | 4f55a25217f679205bd39587a26f2a2d1866cb67 (diff) | |
download | armnn-8c2f651ad454d11dd36e212560af23dbea5b758e.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/Redefine.hpp')
-rw-r--r-- | delegate/src/Redefine.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/delegate/src/Redefine.hpp b/delegate/src/Redefine.hpp index fb58ffdf70..91295768d6 100644 --- a/delegate/src/Redefine.hpp +++ b/delegate/src/Redefine.hpp @@ -105,10 +105,13 @@ TfLiteStatus VisitReshapeOperator(DelegateData& delegateData, for (int i=0; i < reshapeOptions->num_dimensions; ++i) { targetShape.push_back(reshapeOptions->shape[i]); - elementCounter = elementCounter * reshapeOptions->shape[i]; + if (reshapeOptions->shape[i] > 0) + { + elementCounter = elementCounter * reshapeOptions->shape[i]; + } } // Check the number of elements match, otherwise fall back to using the second input tensor. - if (elementCounter == inputTensorInfo0.GetNumElements()) + if (elementCounter <= inputTensorInfo0.GetNumElements()) { targetShapeFound = true; } |