diff options
Diffstat (limited to 'src/armnn/TypesUtils.cpp')
-rw-r--r-- | src/armnn/TypesUtils.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/armnn/TypesUtils.cpp b/src/armnn/TypesUtils.cpp index d419ef84c7..ce9c7fcdca 100644 --- a/src/armnn/TypesUtils.cpp +++ b/src/armnn/TypesUtils.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2017 Arm Ltd. All rights reserved. +// Copyright © 2017, 2024 Arm Ltd. All rights reserved. // SPDX-License-Identifier: MIT // #include <armnn/TypesUtils.hpp> @@ -32,10 +32,6 @@ QuantizedType armnn::Quantize(float value, float scale, int32_t offset) static_assert(IsQuantizedType<QuantizedType>(), "Not an integer type."); constexpr QuantizedType max = std::numeric_limits<QuantizedType>::max(); constexpr QuantizedType min = std::numeric_limits<QuantizedType>::lowest(); - if (scale == 0.f) - { - throw armnn::InvalidArgumentException("Quantize: Scale cannot be 0.f"); - } if (std::isnan(value)) { throw armnn::InvalidArgumentException("Quantize: Value is NaN"); @@ -52,10 +48,6 @@ template <typename QuantizedType> float armnn::Dequantize(QuantizedType value, float scale, int32_t offset) { static_assert(IsQuantizedType<QuantizedType>(), "Not an integer type."); - if (scale == 0.f) - { - throw armnn::InvalidArgumentException("Dequantize: Scale cannot be 0.f"); - } if (std::isnan(value)) { throw armnn::InvalidArgumentException("Dequantize: Value is NaN"); |