diff options
author | Giorgio Arena <giorgio.arena@arm.com> | 2018-04-30 17:29:41 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:51:17 +0000 |
commit | 563494c2f447e201e88e6d7133a41e12971777eb (patch) | |
tree | 716ae5e4978ce378ad14f53591087a7a42f6fe58 /tests/validation/fixtures/PoolingLayerFixture.h | |
parent | b7f5d172ccdb1d884388dd6e0e54f74241afca67 (diff) | |
download | ComputeLibrary-563494c2f447e201e88e6d7133a41e12971777eb.tar.gz |
COMPMID-1084 Rework the way validation is performed for NHWC data layout
Change-Id: I00b95f560548da76718298b642c8166f92421097
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/129520
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/validation/fixtures/PoolingLayerFixture.h')
-rw-r--r-- | tests/validation/fixtures/PoolingLayerFixture.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/validation/fixtures/PoolingLayerFixture.h b/tests/validation/fixtures/PoolingLayerFixture.h index a40baf415a..27b033a06c 100644 --- a/tests/validation/fixtures/PoolingLayerFixture.h +++ b/tests/validation/fixtures/PoolingLayerFixture.h @@ -53,14 +53,8 @@ public: _quantization_info = quantization_info; _pool_info = pool_info; - // Change shape in case of NHWC. - if(data_layout == DataLayout::NHWC) - { - permute(shape, PermutationVector(2U, 0U, 1U)); - } - _target = compute_target(shape, pool_info, data_type, data_layout, fractional_bits, quantization_info); - _reference = compute_reference(shape, pool_info, data_type, data_layout, fractional_bits, quantization_info); + _reference = compute_reference(shape, pool_info, data_type, fractional_bits, quantization_info); } protected: @@ -84,9 +78,15 @@ protected: } } - TensorType compute_target(const TensorShape &shape, PoolingLayerInfo info, + TensorType compute_target(TensorShape shape, PoolingLayerInfo info, DataType data_type, DataLayout data_layout, int fixed_point_position, QuantizationInfo quantization_info) { + // Change shape in case of NHWC. + if(data_layout == DataLayout::NHWC) + { + permute(shape, PermutationVector(2U, 0U, 1U)); + } + // Create tensors TensorType src = create_tensor<TensorType>(shape, data_type, 1, fixed_point_position, quantization_info, data_layout); TensorType dst; @@ -115,10 +115,10 @@ protected: } SimpleTensor<T> compute_reference(const TensorShape &shape, PoolingLayerInfo info, - DataType data_type, DataLayout data_layout, int fixed_point_position, QuantizationInfo quantization_info) + DataType data_type, int fixed_point_position, QuantizationInfo quantization_info) { // Create reference - SimpleTensor<T> src{ shape, data_type, 1, fixed_point_position, quantization_info, data_layout }; + SimpleTensor<T> src{ shape, data_type, 1, fixed_point_position, quantization_info }; // Fill reference fill(src); |