aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/LayerValidateOutputTest.cpp
diff options
context:
space:
mode:
authorNattapat Chaimanowong <nattapat.chaimanowong@arm.com>2019-02-27 10:28:09 +0000
committerAron Virginas-Tar <aron.virginas-tar@arm.com>2019-02-28 15:02:25 +0000
commit3ee1422c824e9dc513566179bcdc0c98657ab0c7 (patch)
tree476f4c6671d07b62c63178cf7a1b9d4b3cfc2ad7 /src/armnn/test/LayerValidateOutputTest.cpp
parent8d69bbc67566c09553c4afec32e829efa2cb50df (diff)
downloadarmnn-3ee1422c824e9dc513566179bcdc0c98657ab0c7.tar.gz
IVGCVSW-2763 Fix bug in BatchToSpaceNdLayer::InferOutputShapes
*Also added test case for non-zero crop and moved BatchToSpaceNd test functions together Change-Id: I142ba356165618b2811a4ab650ca6ced35220d9c Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
Diffstat (limited to 'src/armnn/test/LayerValidateOutputTest.cpp')
-rw-r--r--src/armnn/test/LayerValidateOutputTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/armnn/test/LayerValidateOutputTest.cpp b/src/armnn/test/LayerValidateOutputTest.cpp
index 62b9c4a0d8..999844e252 100644
--- a/src/armnn/test/LayerValidateOutputTest.cpp
+++ b/src/armnn/test/LayerValidateOutputTest.cpp
@@ -17,22 +17,22 @@ BOOST_AUTO_TEST_CASE(TestBatchToSpaceInferOutputShape)
armnn::Graph graph;
armnn::BatchToSpaceNdDescriptor descriptor;
- std::vector<unsigned int> theBlockShape = {2, 2};
- descriptor.m_BlockShape = theBlockShape;
+ descriptor.m_BlockShape = {2, 2};
+ descriptor.m_Crops = {{0, 0}, {2, 0}};
descriptor.m_DataLayout = armnn::DataLayout::NHWC;
armnn::BatchToSpaceNdLayer* const batchToSpaceLayer =
graph.AddLayer<armnn::BatchToSpaceNdLayer>(descriptor, "batchToSpace");
std::vector<armnn::TensorShape> shapes;
- const std::vector<unsigned int> theDimSizes = {4, 2, 2, 1};
+ const std::vector<unsigned int> theDimSizes = {8, 1, 3, 1};
armnn::TensorShape shape(4, theDimSizes.data());
shapes.push_back(shape);
- const std::vector<unsigned int> expectedDimSizes = {1, 4, 4, 1};
+ const std::vector<unsigned int> expectedDimSizes = {2, 2, 4, 1};
armnn::TensorShape expectedShape(4, expectedDimSizes.data());
BOOST_CHECK(expectedShape == batchToSpaceLayer->InferOutputShapes(shapes).at(0));
}
-BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file
+BOOST_AUTO_TEST_SUITE_END()