aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/Quantization.hpp
diff options
context:
space:
mode:
authorSadik Armagan <sadik.armagan@arm.com>2022-08-05 16:12:49 +0100
committerSadik Armagan <sadik.armagan@arm.com>2022-08-08 09:23:37 +0100
commit351f334b5480d7aacc8b8ddd916a3ecb74d0c6c1 (patch)
tree1b4ea68c8f66e726373814682e747cea8f50be51 /delegate/src/Quantization.hpp
parent7dbaaa57148c061396c241911936d2e40fd68b7a (diff)
downloadarmnn-351f334b5480d7aacc8b8ddd916a3ecb74d0c6c1.tar.gz
IVGCVSW-7154 'Constant Tensors As Inputs'
* Fixed the issues about converting Conv2D and DepthwiseConv2d input issues * Read 1D input tensors that do not have shape specified Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I12f3d1c57a2afedac42c6e7b31e4b1fc689abeca
Diffstat (limited to 'delegate/src/Quantization.hpp')
-rw-r--r--delegate/src/Quantization.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/delegate/src/Quantization.hpp b/delegate/src/Quantization.hpp
index 26a933953a..78713759fb 100644
--- a/delegate/src/Quantization.hpp
+++ b/delegate/src/Quantization.hpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -45,9 +45,10 @@ TfLiteStatus VisitDequantizeOperator(DelegateData& delegateData,
return kTfLiteError;
}
-
const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor);
- const armnn::TensorInfo& outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor);
+ armnn::TensorInfo outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor, true);
+
+ UpdateConstantTensorOutputs(inputTensorInfo, outputTensorInfo);
bool isSupported = false;
auto validateFunc = [&](const armnn::TensorInfo& outputTensorInfo, bool& isSupported)
@@ -126,7 +127,7 @@ TfLiteStatus VisitQuantizeOperator(DelegateData& delegateData,
}
const armnn::TensorInfo& inputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteInputTensor);
- const armnn::TensorInfo& outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor);
+ const armnn::TensorInfo& outputTensorInfo = GetTensorInfoForTfLiteTensor(tfLiteOutputTensor, true);
bool isSupported = false;
auto validateFunc = [&](const armnn::TensorInfo& outputTensorInfo, bool& isSupported)