ArmNN
 20.02
Slice.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "ParserFlatbuffersFixture.hpp"
#include "../TfLiteParser.hpp"

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (SliceSingleDim, SliceFixtureSingleDim)
 
 BOOST_FIXTURE_TEST_CASE (SliceD123, SliceFixtureD123)
 
 BOOST_FIXTURE_TEST_CASE (SliceD213, SliceFixtureD213)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/3]

BOOST_FIXTURE_TEST_CASE ( SliceSingleDim  ,
SliceFixtureSingleDim   
)

Definition at line 127 of file Slice.cpp.

128 {
129  RunTest<3, armnn::DataType::Float32>(
130  0,
131  {{"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
132  {{"outputTensor", { 3, 3, 3 }}});
133 
134  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo(0, "outputTensor").second.GetShape()
135  == armnn::TensorShape({1,1,3})));
136 }

◆ BOOST_FIXTURE_TEST_CASE() [2/3]

BOOST_FIXTURE_TEST_CASE ( SliceD123  ,
SliceFixtureD123   
)

Definition at line 146 of file Slice.cpp.

147 {
148  RunTest<3, armnn::DataType::Float32>(
149  0,
150  {{"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
151  {{"outputTensor", { 3, 3, 3, 4, 4, 4 }}});
152 
153  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo(0, "outputTensor").second.GetShape()
154  == armnn::TensorShape({1,2,3})));
155 }

◆ BOOST_FIXTURE_TEST_CASE() [3/3]

BOOST_FIXTURE_TEST_CASE ( SliceD213  ,
SliceFixtureD213   
)

Definition at line 165 of file Slice.cpp.

References BOOST_AUTO_TEST_SUITE_END().

166 {
167  RunTest<3, armnn::DataType::Float32>(
168  0,
169  {{"inputTensor", { 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6 }}},
170  {{"outputTensor", { 3, 3, 3, 5, 5, 5 }}});
171 
172  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo(0, "outputTensor").second.GetShape()
173  == armnn::TensorShape({2,1,3})));
174 }