ArmNN
 21.02
Transpose.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 (TransposeWithPermuteData, TransposeFixtureWithPermuteData)
 
 BOOST_FIXTURE_TEST_CASE (TransposeWithoutPermuteDims, TransposeFixtureWithoutPermuteData)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

BOOST_FIXTURE_TEST_CASE ( TransposeWithPermuteData  ,
TransposeFixtureWithPermuteData   
)

Definition at line 121 of file Transpose.cpp.

122 {
123  RunTest<3, armnn::DataType::Float32>(
124  0,
125  {{"inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }}},
126  {{"outputTensor", { 1, 4, 2, 5, 3, 6, 7, 10, 8, 11, 9, 12 }}});
127 
128  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo(0, "outputTensor").second.GetShape()
129  == armnn::TensorShape({2,3,2})));
130 }

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

BOOST_FIXTURE_TEST_CASE ( TransposeWithoutPermuteDims  ,
TransposeFixtureWithoutPermuteData   
)

Definition at line 142 of file Transpose.cpp.

References BOOST_AUTO_TEST_SUITE_END().

143 {
144  RunTest<3, armnn::DataType::Float32>(
145  0,
146  {{"inputTensor", { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 }}},
147  {{"outputTensor", { 1, 7, 4, 10, 2, 8, 5, 11, 3, 9, 6, 12 }}});
148 
149  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo(0, "outputTensor").second.GetShape()
150  == armnn::TensorShape({3,2,2})));
151 }