From cde1e8adeacea5c33a1682ef7b05a0ef643463b8 Mon Sep 17 00:00:00 2001 From: Moritz Pflanzer Date: Fri, 8 Sep 2017 09:53:14 +0100 Subject: COMPMID-415: Add tests for ConvolutionLayer reshaped weights Change-Id: I6c1209a2afafccba2cbdbcda16aceb3ae0cc7b4b Reviewed-on: http://mpd-gerrit.cambridge.arm.com/87000 Tested-by: Kaizen Reviewed-by: Gian Marco Iodice --- .../fixtures/FullyConnectedLayerFixture.h | 33 +--------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'tests/validation/fixtures/FullyConnectedLayerFixture.h') diff --git a/tests/validation/fixtures/FullyConnectedLayerFixture.h b/tests/validation/fixtures/FullyConnectedLayerFixture.h index d4d68f1af8..b19c40d5ea 100644 --- a/tests/validation/fixtures/FullyConnectedLayerFixture.h +++ b/tests/validation/fixtures/FullyConnectedLayerFixture.h @@ -34,6 +34,7 @@ #include "tests/framework/Asserts.h" #include "tests/framework/Fixture.h" #include "tests/validation/CPP/FullyConnectedLayer.h" +#include "tests/validation/CPP/Utils.h" #include "tests/validation/Helpers.h" #include @@ -44,38 +45,6 @@ namespace test { namespace validation { -namespace -{ -RawTensor transpose(const RawTensor &src, int interleave = 1) -{ - // Create reference - TensorShape dst_shape(src.shape()); - dst_shape.set(0, src.shape().y() * interleave); - dst_shape.set(1, std::ceil(src.shape().x() / static_cast(interleave))); - - RawTensor dst{ dst_shape, src.data_type() }; - - // Compute reference - uint8_t *out_ptr = dst.data(); - - for(int i = 0; i < dst.num_elements(); i += interleave) - { - Coordinates coord = index2coord(dst.shape(), i); - size_t coord_x = coord.x(); - coord.set(0, coord.y() * interleave); - coord.set(1, coord_x / interleave); - - const int num_elements = std::min(interleave, src.shape().x() - coord.x()); - - std::copy_n(static_cast(src(coord)), num_elements * src.element_size(), out_ptr); - - out_ptr += interleave * dst.element_size(); - } - - return dst; -} -} // namespace - template class FullyConnectedLayerValidationFixedPointFixture : public framework::Fixture { -- cgit v1.2.1