diff options
author | Pablo Tello <pablo.tello@arm.com> | 2018-06-14 15:35:49 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:53:09 +0000 |
commit | 7282d562d459066dff3e27fd5299f71e0809990d (patch) | |
tree | ed13231d9d4a2eecbc5d1a6227bff0effbd10c95 /tests/validation/fixtures | |
parent | 542e92d95536f2ab7fc6f1cc1aa1bd4f1d471212 (diff) | |
download | ComputeLibrary-7282d562d459066dff3e27fd5299f71e0809990d.tar.gz |
COMPMID-1287: Extending NEWinogradLayer test suite
Added NHWC to the dataset to the validation tests
Fixed a problem in the output transform which made the Activation to fail
because way/ordering the output transform wrote the data to the output tensor.
Change-Id: I9609f86605dbfef70b47a0fb043287bf0e5d675b
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/136015
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'tests/validation/fixtures')
-rw-r--r-- | tests/validation/fixtures/WinogradConvolutionLayerFixture.h | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h index 07795c2361..aca24f13ae 100644 --- a/tests/validation/fixtures/WinogradConvolutionLayerFixture.h +++ b/tests/validation/fixtures/WinogradConvolutionLayerFixture.h @@ -160,11 +160,12 @@ class WinogradConvolutionLayerFastMathValidationFixture : public framework::Fixt { public: template <typename...> - void setup(TensorShape input_shape, TensorShape weights_shape, TensorShape bias_shape, TensorShape output_shape, PadStrideInfo info, Size2D dilation, DataType data_type, ActivationLayerInfo act_info) + void setup(TensorShape input_shape, TensorShape weights_shape, TensorShape bias_shape, TensorShape output_shape, PadStrideInfo info, Size2D dilation, + DataType data_type, ActivationLayerInfo act_info, const DataLayout &data_layout) + { ARM_COMPUTE_UNUSED(dilation); - - _target = compute_target(input_shape, weights_shape, bias_shape, output_shape, info, data_type, act_info); + _target = compute_target(input_shape, weights_shape, bias_shape, output_shape, info, data_type, act_info, data_layout); _reference = compute_reference(input_shape, weights_shape, bias_shape, output_shape, info, data_type, act_info); } @@ -189,14 +190,21 @@ protected: } } - TensorType compute_target(const TensorShape &input_shape, const TensorShape &weights_shape, const TensorShape &bias_shape, const TensorShape &output_shape, const PadStrideInfo &info, - DataType data_type, ActivationLayerInfo act_info) + TensorType compute_target(TensorShape input_shape, TensorShape weights_shape, TensorShape bias_shape, TensorShape output_shape, const PadStrideInfo &info, + DataType data_type, ActivationLayerInfo act_info, const DataLayout data_layout) { + if(data_layout == DataLayout::NHWC) + { + permute(input_shape, PermutationVector(2U, 0U, 1U)); + permute(weights_shape, PermutationVector(2U, 0U, 1U)); + permute(output_shape, PermutationVector(2U, 0U, 1U)); + } + // Create tensors - TensorType src = create_tensor<TensorType>(input_shape, data_type, 1); - TensorType weights = create_tensor<TensorType>(weights_shape, data_type, 1); - TensorType bias = create_tensor<TensorType>(bias_shape, data_type, 1); - TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1); + TensorType src = create_tensor<TensorType>(input_shape, data_type, 1, 0, QuantizationInfo(), data_layout); + TensorType weights = create_tensor<TensorType>(weights_shape, data_type, 1, 0, QuantizationInfo(), data_layout); + TensorType bias = create_tensor<TensorType>(bias_shape, data_type, 1, 0, QuantizationInfo(), data_layout); + TensorType dst = create_tensor<TensorType>(output_shape, data_type, 1, 0, QuantizationInfo(), data_layout); // Create and configure function FunctionType conv; |