ArmNN
 20.02
Transpose.cpp File Reference
#include "armnnTfParser/ITfParser.hpp"
#include "ParserPrototxtFixture.hpp"
#include <boost/test/unit_test.hpp>
#include <PrototxtConversions.hpp>

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (TransposeWithPermuteData, TransposeFixtureWithPermuteData)
 
 BOOST_FIXTURE_TEST_CASE (TransposeWithoutPermuteData, TransposeFixtureWithoutPermuteData)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

BOOST_FIXTURE_TEST_CASE ( TransposeWithPermuteData  ,
TransposeFixtureWithPermuteData   
)

Definition at line 114 of file Transpose.cpp.

115 {
116  RunTest<4>(
117  {{"input", {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
118  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
119  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}},
120  {{"output", {0, 24, 4, 28, 8, 32, 1, 25, 5, 29, 9, 33, 2, 26, 6,
121  30, 10, 34, 3, 27, 7, 31, 11, 35, 12, 36, 16, 40, 20, 44, 13, 37,
122  17, 41, 21, 45, 14, 38, 18, 42, 22, 46, 15, 39, 19, 43, 23, 47}}});
123 
124  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("output").second.GetShape()
125  == armnn::TensorShape({2, 4, 3, 2})));
126 }

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

BOOST_FIXTURE_TEST_CASE ( TransposeWithoutPermuteData  ,
TransposeFixtureWithoutPermuteData   
)

Definition at line 137 of file Transpose.cpp.

References BOOST_AUTO_TEST_SUITE_END().

138 {
139  RunTest<4>(
140  {{"input", {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
141  16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
142  32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47}}},
143  {{"output", {0, 24, 12, 36, 4, 28, 16, 40, 8, 32, 20, 44, 1, 25,
144  13, 37, 5, 29, 17, 41, 9, 33, 21, 45, 2, 26, 14, 38, 6, 30, 18,
145  42,10, 34, 22, 46, 3, 27, 15, 39, 7, 31, 19, 43, 11, 35, 23, 47}}});
146 
147  BOOST_TEST((m_Parser->GetNetworkOutputBindingInfo("output").second.GetShape()
148  == armnn::TensorShape({4, 3, 2, 2})));
149 }