diff options
Diffstat (limited to 'tests/validation/fixtures/QuantizationLayerFixture.h')
-rw-r--r-- | tests/validation/fixtures/QuantizationLayerFixture.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tests/validation/fixtures/QuantizationLayerFixture.h b/tests/validation/fixtures/QuantizationLayerFixture.h index 84d4d7a7b3..4ffc659027 100644 --- a/tests/validation/fixtures/QuantizationLayerFixture.h +++ b/tests/validation/fixtures/QuantizationLayerFixture.h @@ -42,15 +42,15 @@ namespace test { namespace validation { -template <typename TensorType, typename AccessorType, typename FunctionType, typename T> +template <typename TensorType, typename AccessorType, typename FunctionType, typename Tin, typename Tout> class QuantizationValidationFixture : public framework::Fixture { public: template <typename...> - void setup(TensorShape shape, DataType data_type, QuantizationInfo quant_info) + void setup(TensorShape shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { - _target = compute_target(shape, data_type, quant_info); - _reference = compute_reference(shape, data_type, quant_info); + _target = compute_target(shape, data_type_in, data_type_out, qinfo); + _reference = compute_reference(shape, data_type_in, data_type_out, qinfo); } protected: @@ -60,11 +60,11 @@ protected: library->fill_tensor_uniform(tensor, 0); } - TensorType compute_target(const TensorShape &shape, DataType data_type, QuantizationInfo quant_info) + TensorType compute_target(const TensorShape &shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { // Create tensors - TensorType src = create_tensor<TensorType>(shape, data_type); - TensorType dst = create_tensor<TensorType>(shape, DataType::QASYMM8, 1, quant_info); + TensorType src = create_tensor<TensorType>(shape, data_type_in); + TensorType dst = create_tensor<TensorType>(shape, data_type_out, 1, qinfo); // Create and configure function FunctionType quantization_layer; @@ -89,19 +89,19 @@ protected: return dst; } - SimpleTensor<uint8_t> compute_reference(const TensorShape &shape, DataType data_type, QuantizationInfo quant_info) + SimpleTensor<Tout> compute_reference(const TensorShape &shape, DataType data_type_in, DataType data_type_out, QuantizationInfo qinfo) { // Create reference - SimpleTensor<T> src{ shape, data_type }; + SimpleTensor<Tin> src{ shape, data_type_in }; // Fill reference fill(src); - return reference::quantization_layer<T>(src, quant_info); + return reference::quantization_layer<Tin, Tout>(src, data_type_out, qinfo); } - TensorType _target{}; - SimpleTensor<uint8_t> _reference{}; + TensorType _target{}; + SimpleTensor<Tout> _reference{}; }; } // namespace validation |