From 156fcf3f36f6168e47d65db167bba3af5037e3d9 Mon Sep 17 00:00:00 2001 From: Giorgio Arena Date: Fri, 9 Mar 2018 15:30:43 +0000 Subject: COMPMID-802 Add NHWC data format support for NEON im2col. Change-Id: I86e678179106a2b83d1c6a7cfe562df91b0f9eb2 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124000 Tested-by: Jenkins Reviewed-by: Pablo Tello --- tests/validation/reference/FlattenLayer.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'tests/validation/reference/FlattenLayer.cpp') diff --git a/tests/validation/reference/FlattenLayer.cpp b/tests/validation/reference/FlattenLayer.cpp index 611701d8cf..44f4d93178 100644 --- a/tests/validation/reference/FlattenLayer.cpp +++ b/tests/validation/reference/FlattenLayer.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -34,12 +34,8 @@ namespace validation namespace reference { template -SimpleTensor flatten_layer(const SimpleTensor &src) +SimpleTensor flatten_layer(const SimpleTensor &src, const TensorShape &shape_flatten) { - TensorShape shape_flatten(src.shape()); - shape_flatten.set(0, src.shape()[0] * src.shape()[1] * src.shape()[2]); - shape_flatten.remove_dimension(1); - shape_flatten.remove_dimension(1); SimpleTensor dst(shape_flatten, src.data_type(), 1, src.fixed_point_position()); // Note: Since the reference implementation does not use padding bytes, we can copy directly the content of the source tensor @@ -48,10 +44,10 @@ SimpleTensor flatten_layer(const SimpleTensor &src) return dst; } -template SimpleTensor flatten_layer(const SimpleTensor &src); -template SimpleTensor flatten_layer(const SimpleTensor &src); -template SimpleTensor flatten_layer(const SimpleTensor &src); -template SimpleTensor flatten_layer(const SimpleTensor &src); +template SimpleTensor flatten_layer(const SimpleTensor &src, const TensorShape &shape_flatten); +template SimpleTensor flatten_layer(const SimpleTensor &src, const TensorShape &shape_flatten); +template SimpleTensor flatten_layer(const SimpleTensor &src, const TensorShape &shape_flatten); +template SimpleTensor flatten_layer(const SimpleTensor &src, const TensorShape &shape_flatten); } // namespace reference } // namespace validation } // namespace test -- cgit v1.2.1