ArmNN
 20.11
PassThru.cpp File Reference
#include <boost/test/unit_test.hpp>
#include "armnnTfParser/ITfParser.hpp"
#include "ParserPrototxtFixture.hpp"

Go to the source code of this file.

Functions

 BOOST_FIXTURE_TEST_CASE (ValidateOutput, PassThruFixture)
 
 BOOST_FIXTURE_TEST_CASE (RunGraph, PassThruFixture)
 

Function Documentation

◆ BOOST_FIXTURE_TEST_CASE() [1/2]

BOOST_FIXTURE_TEST_CASE ( ValidateOutput  ,
PassThruFixture   
)

Definition at line 36 of file PassThru.cpp.

37 {
38  BOOST_TEST(m_Parser->GetNetworkOutputBindingInfo("Placeholder").second.GetNumDimensions() == 2);
39  BOOST_TEST(m_Parser->GetNetworkOutputBindingInfo("Placeholder").second.GetShape()[0] == 1);
40  BOOST_TEST(m_Parser->GetNetworkOutputBindingInfo("Placeholder").second.GetShape()[1] == 7);
41 }

◆ BOOST_FIXTURE_TEST_CASE() [2/2]

BOOST_FIXTURE_TEST_CASE ( RunGraph  ,
PassThruFixture   
)

Definition at line 43 of file PassThru.cpp.

References BOOST_AUTO_TEST_SUITE_END().

44 {
45  armnn::TensorInfo inputTensorInfo = m_Parser->GetNetworkInputBindingInfo("Placeholder").second;
46  auto input = MakeRandomTensor<float, 2>(inputTensorInfo, 378346);
47  std::vector<float> inputVec;
48  inputVec.assign(input.data(), input.data() + input.num_elements());
49  RunTest<2>(inputVec, inputVec); // The passthru network should output the same as the input.
50 }