From ac4e873dad6aa6291fc36aff62047a896db04f6a Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Wed, 5 Jul 2017 17:02:25 +0100 Subject: COMPMID-417: Port DepthConcatenate to QS8/QS16 for NEON/CL. Change-Id: I3dddae63043c7aa18d908a4fc8abacf3c64f98ca Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80081 Tested-by: Kaizen Reviewed-by: Steven Niu --- tests/validation/Reference.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/validation/Reference.cpp') diff --git a/tests/validation/Reference.cpp b/tests/validation/Reference.cpp index 04362f0dc1..857dd7c741 100644 --- a/tests/validation/Reference.cpp +++ b/tests/validation/Reference.cpp @@ -538,6 +538,30 @@ RawTensor Reference::compute_reference_convolution_layer(const TensorShape &inpu return ref_dst; } +RawTensor Reference::compute_reference_depth_concatenate_layer(const std::vector &shapes, DataType dt, int fixed_point_position) +{ + std::vector> ref_srcs{}; + TensorShape dst_shape = calculate_depth_concatenate_shape(shapes); + + // Create tensors + for(unsigned int i = 0; i < shapes.size(); ++i) + { + ref_srcs.push_back(support::cpp14::make_unique(RawTensor(shapes[i], dt, 1, fixed_point_position))); + } + RawTensor ref_dst = library->get(dst_shape, dt, 1, fixed_point_position); + + // Fill references + for(unsigned int i = 0; i < ref_srcs.size(); ++i) + { + library->fill_tensor_uniform(*ref_srcs[i], i); + } + + // Compute reference + ReferenceCPP::depth_concatenate_layer(ref_srcs, ref_dst); + + return ref_dst; +} + RawTensor Reference::compute_reference_fully_connected_layer(const TensorShape &input_shape, const TensorShape &weights_shape, const TensorShape &bias_shape, const TensorShape &output_shape, DataType dt, bool transpose_weights, int fixed_point_position) { -- cgit v1.2.1