aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/Redefine.hpp
diff options
context:
space:
mode:
authorNarumol Prangnawarat <narumol.prangnawarat@arm.com>2020-11-20 16:17:48 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2020-11-20 18:05:50 +0000
commit1672542bcbfdffadef15f7e844236a1a3da089b5 (patch)
treeef228d88eff5b4e373d2b6c24f040b0d0a4c1c29 /delegate/src/Redefine.hpp
parent56870183198842be1706562d8386f4e5f534e9b6 (diff)
downloadarmnn-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/Redefine.hpp')
-rw-r--r--delegate/src/Redefine.hpp7
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;
}