From a160b245a5c876d3630651e938a7c45ee30645be Mon Sep 17 00:00:00 2001 From: Matteo Martincigh Date: Thu, 18 Oct 2018 10:33:23 +0100 Subject: IVGCVSW-2033 Add unit tests for the newly implemented NHWC support in ref Normalization * Added create workload unit tests for the NHWC data layout Change-Id: Id4813105c027a26e277de64fecea1845fea39fd9 --- src/armnn/test/CreateWorkload.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/armnn/test') diff --git a/src/armnn/test/CreateWorkload.hpp b/src/armnn/test/CreateWorkload.hpp index f3cf544fa3..51820a425f 100644 --- a/src/armnn/test/CreateWorkload.hpp +++ b/src/armnn/test/CreateWorkload.hpp @@ -517,9 +517,16 @@ std::unique_ptr CreateNormalizationWorkloadTest(armnn::IW Layer* const input = graph.AddLayer(0, "input"); Layer* const output = graph.AddLayer(0, "output"); + TensorShape inputShape = (dataLayout == DataLayout::NCHW) ? + TensorShape{ 3, 5, 5, 1 } : TensorShape{ 3, 1, 5, 5 }; + TensorShape outputShape = (dataLayout == DataLayout::NCHW) ? + TensorShape{ 3, 5, 5, 1 } : TensorShape{ 3, 1, 5, 5 }; + // Connects up. - Connect(input, layer, TensorInfo({3, 5, 5, 1}, DataType)); - Connect(layer, output, TensorInfo({3, 5, 5, 1}, DataType)); + armnn::TensorInfo inputTensorInfo(inputShape, DataType); + armnn::TensorInfo outputTensorInfo(outputShape, DataType); + Connect(input, layer, inputTensorInfo); + Connect(layer, output, outputTensorInfo); CreateTensorHandles(graph, factory); // Makes the workload and checks it. -- cgit v1.2.1