diff options
author | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-09-08 13:05:51 +0100 |
---|---|---|
committer | Matthew Sloyan <matthew.sloyan@arm.com> | 2021-10-01 15:27:01 +0100 |
commit | b63a31170aee1d28267d83a4bc67b57708fb6b05 (patch) | |
tree | 16cea0a872939be749b72f45ad125964439bc40e /src/armnn/test/InferOutputTests.hpp | |
parent | eb852bb9e45b1db42a26001ece11ec7cc1f2bbfe (diff) | |
download | armnn-b63a31170aee1d28267d83a4bc67b57708fb6b05.tar.gz |
IVGCVSW-6163 Add Conv3d FrontEnd and Ref Implementation
* Added front-end
* Added Reference workload
* Added Serializer & Deserializer support
* Added unit tests
* Added NDHWC DataLayout
Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com>
Change-Id: Iec4d39e7433b5334d52fa44cf8efc6bcd39319d8
Diffstat (limited to 'src/armnn/test/InferOutputTests.hpp')
-rw-r--r-- | src/armnn/test/InferOutputTests.hpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/armnn/test/InferOutputTests.hpp b/src/armnn/test/InferOutputTests.hpp index 6e2676ec8e..e2c854551f 100644 --- a/src/armnn/test/InferOutputTests.hpp +++ b/src/armnn/test/InferOutputTests.hpp @@ -464,6 +464,43 @@ void Convolution2dInferOutputShapeTest() CHECK(expectedOutputShape == convolution2dLayer->InferOutputShapes(shapes).at(0)); } +void Convolution3dInferOutputShapeTest() +{ + armnn::Graph graph; + + armnn::Convolution3dDescriptor descriptor; + descriptor.m_DilationX = 1; + descriptor.m_DilationY = 1; + descriptor.m_DilationZ = 1; + descriptor.m_PadTop = 1; + descriptor.m_PadBottom = 1; + descriptor.m_PadLeft = 1; + descriptor.m_PadRight = 1; + descriptor.m_PadFront = 1; + descriptor.m_PadBack = 1; + descriptor.m_StrideX = 2; + descriptor.m_StrideY = 2; + descriptor.m_StrideZ = 2; + descriptor.m_DataLayout = armnn::DataLayout::NDHWC; + + armnn::Convolution3dLayer* const convolution3dLayer = + graph.AddLayer<armnn::Convolution3dLayer>(descriptor, "convolution3d"); + + std::vector<armnn::TensorShape> shapes; + const std::vector<unsigned int> inputSize = {1, 5, 5, 5, 1}; + armnn::TensorShape inputShape(5, inputSize.data()); + shapes.push_back(inputShape); + + const std::vector<unsigned int> filterSize = {3, 3, 3, 1, 1 }; + armnn::TensorShape filterShape(5, filterSize.data()); + shapes.push_back(filterShape); + + const std::vector<unsigned int> expectedOutputSizes = {1, 3, 3, 3, 1}; + armnn::TensorShape expectedOutputShape(5, expectedOutputSizes.data()); + + CHECK(expectedOutputShape == convolution3dLayer->InferOutputShapes(shapes).at(0)); +} + void TransposeConvolution2dInferOutputShapeTest() { armnn::Graph graph; |