From 69df64fc340215b8ce71d30105eb681811f5e0c3 Mon Sep 17 00:00:00 2001 From: Freddie Liardet Date: Tue, 26 Oct 2021 14:06:47 +0100 Subject: Improve conv3d validation Improve validation of cpu conv3d and add validation test. Align Size3D to Size3D comparison with how Size2D implements it. Remove print statement in MaxUnpooling validation tests. Signed-off-by: Freddie Liardet Change-Id: I17048d56b08704cdbf1ad978af02009e57f3aa83 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/6512 Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins --- tests/validation/CL/Convolution3D.cpp | 4 ++-- tests/validation/CL/MaxUnpoolingLayer.cpp | 1 - tests/validation/NEON/Convolution3D.cpp | 6 +++++- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/validation') diff --git a/tests/validation/CL/Convolution3D.cpp b/tests/validation/CL/Convolution3D.cpp index 2d1dc574f8..9e4ca50547 100644 --- a/tests/validation/CL/Convolution3D.cpp +++ b/tests/validation/CL/Convolution3D.cpp @@ -114,7 +114,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zi framework::dataset::make("SrcDataType", { DataType::F32, DataType::F32, DataType::F32, - DataType::QASYMM8, + DataType::U32, DataType::F32, DataType::F32, DataType::F32, @@ -126,7 +126,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip(zip(zip(zi framework::dataset::make("WeightsDataType", { DataType::F32, DataType::F32, DataType::F16, - DataType::QASYMM8, + DataType::U32, DataType::F32, DataType::F32, DataType::F32, diff --git a/tests/validation/CL/MaxUnpoolingLayer.cpp b/tests/validation/CL/MaxUnpoolingLayer.cpp index a0b20caeae..cf4fcdda70 100644 --- a/tests/validation/CL/MaxUnpoolingLayer.cpp +++ b/tests/validation/CL/MaxUnpoolingLayer.cpp @@ -57,7 +57,6 @@ FIXTURE_DATA_TEST_CASE(MaxUnpooling, CLMaxUnpoolingLayerFixture, framewor )) { - printf("validate\n"); // Validate output validate(CLAccessor(_target), _reference); } diff --git a/tests/validation/NEON/Convolution3D.cpp b/tests/validation/NEON/Convolution3D.cpp index 1bfac900c0..4185488742 100644 --- a/tests/validation/NEON/Convolution3D.cpp +++ b/tests/validation/NEON/Convolution3D.cpp @@ -87,6 +87,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( TensorInfo(TensorShape(27U, 13U, 2U, 4U), 1U, DataType::F32, DataLayout::NDHWC), // Invalid biases size TensorInfo(TensorShape(27U, 13U, 2U, 4U), 1U, DataType::F32, DataLayout::NDHWC), // Invalid biases dimensions TensorInfo(TensorShape(27U, 13U, 2U, 4U), 1U, DataType::F32, DataLayout::NDHWC), // Invalid output size + TensorInfo(TensorShape(27U, 13U, 2U, 4U), 1U, DataType::U32, DataLayout::NDHWC), // Invalid data type }), framework::dataset::make("WeightsInfo",{ TensorInfo(TensorShape(4U, 3U, 3U, 3U, 2U), 1U, DataType::F16), TensorInfo(TensorShape(4U, 3U, 3U, 3U, 3U), 1U, DataType::F32), @@ -95,6 +96,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( TensorInfo(TensorShape(4U, 3U, 3U, 3U, 2U), 1U, DataType::F32), TensorInfo(TensorShape(4U, 3U, 3U, 3U, 2U), 1U, DataType::F32), TensorInfo(TensorShape(4U, 3U, 3U, 3U, 2U), 1U, DataType::F32), + TensorInfo(TensorShape(4U, 3U, 3U, 3U, 2U), 1U, DataType::U32), })), framework::dataset::make("BiasesInfo",{ TensorInfo(TensorShape(4U), 1U, DataType::F32), TensorInfo(TensorShape(4U), 1U, DataType::F32), @@ -103,6 +105,7 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( TensorInfo(TensorShape(3U), 1U, DataType::F32), TensorInfo(TensorShape(4U, 2U), 1U, DataType::F32), TensorInfo(TensorShape(4U), 1U, DataType::F32), + TensorInfo(TensorShape(4U), 1U, DataType::F32), })), framework::dataset::make("OutputInfo",{ TensorInfo(TensorShape(25U, 11U, 4U), 1U, DataType::F32), TensorInfo(TensorShape(25U, 11U, 4U), 1U, DataType::F32), @@ -111,8 +114,9 @@ DATA_TEST_CASE(Validate, framework::DatasetMode::ALL, zip(zip(zip(zip( TensorInfo(TensorShape(25U, 11U, 4U), 1U, DataType::F32), TensorInfo(TensorShape(25U, 11U, 4U), 1U, DataType::F32), TensorInfo(TensorShape(26U, 11U, 4U), 1U, DataType::F32), + TensorInfo(TensorShape(25U, 11U, 4U), 1U, DataType::U32), })), - framework::dataset::make("Expected", { false, false, false, false, false, false, false })), + framework::dataset::make("Expected", { false, false, false, false, false, false, false, false})), input_info, weights_info, biases_info, output_info, expected) { const Conv3dInfo conv3d_info(Size3D(1, 1, 1), Padding3D(0, 0, 0), ActivationLayerInfo(), Size3D(1U, 1U, 1U), DimensionRoundingType::FLOOR, false); -- cgit v1.2.1