From d109a4d0fb980f2e97c05cd86451eda0b53f37ef Mon Sep 17 00:00:00 2001 From: Sadik Armagan Date: Tue, 28 Jul 2020 10:42:13 +0100 Subject: IVGCVSW-4932 Introduce ShapeInferenceMethod to TfLite Parser * Introduced ShapeInferenceMethod::InferAndValidate to TfLiteParser * Added unit tests Signed-off-by: Sadik Armagan Change-Id: Iad4aadce92912e7645b1652019ec4af478b7fc32 --- src/armnnTfLiteParser/test/Slice.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/armnnTfLiteParser/test/Slice.cpp') diff --git a/src/armnnTfLiteParser/test/Slice.cpp b/src/armnnTfLiteParser/test/Slice.cpp index 17d1b1a68c..b94a9832b7 100644 --- a/src/armnnTfLiteParser/test/Slice.cpp +++ b/src/armnnTfLiteParser/test/Slice.cpp @@ -173,4 +173,21 @@ BOOST_FIXTURE_TEST_CASE(SliceD213, SliceFixtureD213) == armnn::TensorShape({2,1,3}))); } +struct DynamicSliceFixtureD213 : SliceFixture +{ + DynamicSliceFixtureD213() : SliceFixture("[ 3, 2, 3 ]", + "[ ]", + "[ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]", + "[ 2, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0 ]") {} +}; + +BOOST_FIXTURE_TEST_CASE(DynamicSliceD213, DynamicSliceFixtureD213) +{ + RunTest<3, armnn::DataType::Float32, armnn::DataType::Float32>( + 0, + {{"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}}, + {{"outputTensor", { 3, 3, 3, 5, 5, 5 }}}, + true); +} + BOOST_AUTO_TEST_SUITE_END() \ No newline at end of file -- cgit v1.2.1