diff options
Diffstat (limited to 'delegate/src/DelegateUtils.hpp')
-rw-r--r-- | delegate/src/DelegateUtils.hpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/delegate/src/DelegateUtils.hpp b/delegate/src/DelegateUtils.hpp index 940d269c5b..e0de809ab3 100644 --- a/delegate/src/DelegateUtils.hpp +++ b/delegate/src/DelegateUtils.hpp @@ -420,6 +420,7 @@ armnn::TensorInfo GetTensorInfoForTfLiteTensor(const TfLiteTensor& tfLiteTensor) safeShape.data(), dimensionsSpecificity); ret = armnn::TensorInfo(tensorShape, type); + ret.SetConstant(true); } else { @@ -442,7 +443,16 @@ armnn::TensorInfo GetTensorInfoForTfLiteTensor(const TfLiteTensor& tfLiteTensor) armnn::TensorShape tensorShape(static_cast<unsigned int>(tensorDimensionSize), tensorDims.data(), dimensionsSpecificity); - ret = armnn::TensorInfo(tensorShape, type); + + if(tflite::IsConstantTensor(&tfLiteTensor)) + { + ret = armnn::TensorInfo(tensorShape, type); + ret.SetConstant(true); + } + else + { + ret = armnn::TensorInfo(tensorShape, type); + } } auto quantizationInfo = tfLiteTensor.quantization; |