From 6940dd720ebb6b3d1df8ca203ab696daefe58189 Mon Sep 17 00:00:00 2001 From: Jim Flynn Date: Fri, 20 Mar 2020 12:25:56 +0000 Subject: renamed Documentation folder 20.02 and added .nojekyll file Signed-off-by: Jim Flynn --- 20.02/_input_output_tensor_names_8cpp.xhtml | 327 ++++++++++++++++++++++++++++ 1 file changed, 327 insertions(+) create mode 100644 20.02/_input_output_tensor_names_8cpp.xhtml (limited to '20.02/_input_output_tensor_names_8cpp.xhtml') diff --git a/20.02/_input_output_tensor_names_8cpp.xhtml b/20.02/_input_output_tensor_names_8cpp.xhtml new file mode 100644 index 0000000000..8be11b02d5 --- /dev/null +++ b/20.02/_input_output_tensor_names_8cpp.xhtml @@ -0,0 +1,327 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfLiteParser/test/InputOutputTensorNames.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
InputOutputTensorNames.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 (EmptyNetworkHasNoInputsAndOutputs, EmptyNetworkFixture)
 
 BOOST_FIXTURE_TEST_CASE (MissingTensorsThrowException, MissingTensorsFixture)
 
 BOOST_FIXTURE_TEST_CASE (InvalidTensorsThrowException, InvalidTensorsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetValidInputOutputTensorNames, ValidTensorsFixture)
 
 BOOST_FIXTURE_TEST_CASE (ThrowIfSubgraphIdInvalidForInOutNames, ValidTensorsFixture)
 
 BOOST_FIXTURE_TEST_CASE (Rank0Tensor, Rank0TensorFixture)
 
+

Function Documentation

+ +

◆ BOOST_FIXTURE_TEST_CASE() [1/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (EmptyNetworkHasNoInputsAndOutputs ,
EmptyNetworkFixture  
)
+
+ +

Definition at line 24 of file InputOutputTensorNames.cpp.

+ +

References ParserFlatbuffersFixture::Setup().

+
25 {
26  Setup();
27  BOOST_TEST(m_Parser->GetSubgraphCount() == 1);
28  BOOST_TEST(m_Parser->GetSubgraphInputTensorNames(0).size() == 0);
29  BOOST_TEST(m_Parser->GetSubgraphOutputTensorNames(0).size() == 0);
30 }
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [2/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (MissingTensorsThrowException ,
MissingTensorsFixture  
)
+
+ +

Definition at line 48 of file InputOutputTensorNames.cpp.

+
49 {
50  // this throws because it cannot do the input output tensor connections
51  BOOST_CHECK_THROW(Setup(), armnn::ParseException);
52 }
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [3/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (InvalidTensorsThrowException ,
InvalidTensorsFixture  
)
+
+ +

Definition at line 81 of file InputOutputTensorNames.cpp.

+ +

References armnn::MaxNumOfTensorDimensions.

+
82 {
83  // Tensor numDimensions must be less than or equal to MaxNumOfTensorDimensions
84  static_assert(armnn::MaxNumOfTensorDimensions == 5, "Please update InvalidTensorsFixture");
85  BOOST_CHECK_THROW(Setup(), armnn::InvalidArgumentException);
86 }
+
constexpr unsigned int MaxNumOfTensorDimensions
Definition: Types.hpp:18
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [4/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetValidInputOutputTensorNames ,
ValidTensorsFixture  
)
+
+ +

Definition at line 131 of file InputOutputTensorNames.cpp.

+
132 {
133  Setup();
134  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphInputTensorNames(0).size(), 1u);
135  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphOutputTensorNames(0).size(), 1u);
136  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphInputTensorNames(0)[0], "In");
137  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphOutputTensorNames(0)[0], "Out");
138 }
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [5/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (ThrowIfSubgraphIdInvalidForInOutNames ,
ValidTensorsFixture  
)
+
+ +

Definition at line 140 of file InputOutputTensorNames.cpp.

+
141 {
142  Setup();
143 
144  // these throw because of the invalid subgraph id
145  BOOST_CHECK_THROW(m_Parser->GetSubgraphInputTensorNames(1), armnn::ParseException);
146  BOOST_CHECK_THROW(m_Parser->GetSubgraphOutputTensorNames(1), armnn::ParseException);
147 }
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [6/6]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (Rank0Tensor ,
Rank0TensorFixture  
)
+
+ +

Definition at line 188 of file InputOutputTensorNames.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END().

+
189 {
190  Setup();
191  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphInputTensorNames(0).size(), 2u);
192  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphOutputTensorNames(0).size(), 1u);
193  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphInputTensorNames(0)[0], "In0");
194  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphInputTensorNames(0)[1], "In1");
195  BOOST_CHECK_EQUAL(m_Parser->GetSubgraphOutputTensorNames(0)[0], "Out");
196 }
+
+
+
+
+ + + + -- cgit v1.2.1