From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- ...te_parser_2test_2_get_inputs_outputs_8cpp.xhtml | 536 +++++++++++++++++++++ 1 file changed, 536 insertions(+) create mode 100644 21.02/armnn_tf_lite_parser_2test_2_get_inputs_outputs_8cpp.xhtml (limited to '21.02/armnn_tf_lite_parser_2test_2_get_inputs_outputs_8cpp.xhtml') diff --git a/21.02/armnn_tf_lite_parser_2test_2_get_inputs_outputs_8cpp.xhtml b/21.02/armnn_tf_lite_parser_2test_2_get_inputs_outputs_8cpp.xhtml new file mode 100644 index 0000000000..5cb9095884 --- /dev/null +++ b/21.02/armnn_tf_lite_parser_2test_2_get_inputs_outputs_8cpp.xhtml @@ -0,0 +1,536 @@ + + + + + + + + + + + + + +ArmNN: src/armnnTfLiteParser/test/GetInputsOutputs.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
GetInputsOutputs.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "ParserFlatbuffersFixture.hpp"
+#include "../TfLiteParser.hpp"
+
+

Go to the source code of this file.

+ + + + +

+Typedefs

using ModelPtr = TfLiteParserImpl::ModelPtr
 
+ + + + + + + + + + + + + + + + + + + + + + + + + +

+Functions

 BOOST_FIXTURE_TEST_CASE (GetEmptyInputs, GetEmptyInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetEmptyOutputs, GetEmptyInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetInputs, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetOutputs, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetInputsMultipleInputs, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetOutputs2, GetInputsOutputsFixture)
 
 BOOST_AUTO_TEST_CASE (GetInputsNullModel)
 
 BOOST_AUTO_TEST_CASE (GetOutputsNullModel)
 
 BOOST_FIXTURE_TEST_CASE (GetInputsInvalidSubgraph, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetOutputsInvalidSubgraph, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetInputsInvalidOperator, GetInputsOutputsFixture)
 
 BOOST_FIXTURE_TEST_CASE (GetOutputsInvalidOperator, GetInputsOutputsFixture)
 
+

Typedef Documentation

+ +

◆ ModelPtr

+ +
+
+ + + + +
using ModelPtr = TfLiteParserImpl::ModelPtr
+
+ +

Definition at line 10 of file GetInputsOutputs.cpp.

+ +
+
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE() [1/2]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (GetInputsNullModel )
+
+ +

Definition at line 211 of file GetInputsOutputs.cpp.

+
212 {
213  BOOST_CHECK_THROW(TfLiteParserImpl::GetInputs(nullptr, 0, 0), armnn::ParseException);
214 }
+
+
+
+ +

◆ BOOST_AUTO_TEST_CASE() [2/2]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (GetOutputsNullModel )
+
+ +

Definition at line 216 of file GetInputsOutputs.cpp.

+
217 {
218  BOOST_CHECK_THROW(TfLiteParserImpl::GetOutputs(nullptr, 0, 0), armnn::ParseException);
219 }
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [1/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetEmptyInputs ,
GetEmptyInputsOutputsFixture  
)
+
+ +

Definition at line 153 of file GetInputsOutputs.cpp.

+
154 {
155  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
156  m_GraphBinary.size());
157  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetInputs(model, 0, 0);
158  BOOST_CHECK_EQUAL(0, tensors.size());
159 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [2/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetEmptyOutputs ,
GetEmptyInputsOutputsFixture  
)
+
+ +

Definition at line 161 of file GetInputsOutputs.cpp.

+
162 {
163  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
164  m_GraphBinary.size());
165  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetOutputs(model, 0, 0);
166  BOOST_CHECK_EQUAL(0, tensors.size());
167 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [3/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetInputs ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 169 of file GetInputsOutputs.cpp.

+
170 {
171  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
172  m_GraphBinary.size());
173  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetInputs(model, 0, 0);
174  BOOST_CHECK_EQUAL(1, tensors.size());
175  CheckTensors(tensors[0], 4, { 1, 2, 2, 1 }, tflite::TensorType::TensorType_UINT8, 1,
176  "InputTensor", { -1.2f }, { 25.5f }, { 0.25f }, { 10 });
177 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [4/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetOutputs ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 179 of file GetInputsOutputs.cpp.

+
180 {
181  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
182  m_GraphBinary.size());
183  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetOutputs(model, 0, 0);
184  BOOST_CHECK_EQUAL(1, tensors.size());
185  CheckTensors(tensors[0], 4, { 1, 1, 1, 1 }, tflite::TensorType::TensorType_UINT8, 0,
186  "OutputTensor", { 0.0f }, { 255.0f }, { 1.0f }, { 0 });
187 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [5/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetInputsMultipleInputs ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 189 of file GetInputsOutputs.cpp.

+
190 {
191  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
192  m_GraphBinary.size());
193  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetInputs(model, 1, 0);
194  BOOST_CHECK_EQUAL(2, tensors.size());
195  CheckTensors(tensors[0], 4, { 1, 3, 3, 1 }, tflite::TensorType::TensorType_UINT8, 0,
196  "ConvInputTensor", { }, { }, { 1.0f }, { 0 });
197  CheckTensors(tensors[1], 4, { 1, 3, 3, 1 }, tflite::TensorType::TensorType_UINT8, 2,
198  "filterTensor", { 0.0f }, { 255.0f }, { 1.0f }, { 0 });
199 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [6/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetOutputs2 ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 201 of file GetInputsOutputs.cpp.

+
202 {
203  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
204  m_GraphBinary.size());
205  TfLiteParserImpl::TensorRawPtrVector tensors = TfLiteParserImpl::GetOutputs(model, 1, 0);
206  BOOST_CHECK_EQUAL(1, tensors.size());
207  CheckTensors(tensors[0], 4, { 1, 1, 1, 1 }, tflite::TensorType::TensorType_UINT8, 1,
208  "ConvOutputTensor", { 0.0f }, { 511.0f }, { 2.0f }, { 0 });
209 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+
std::vector< TensorRawPtr > TensorRawPtrVector
+
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [7/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetInputsInvalidSubgraph ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 221 of file GetInputsOutputs.cpp.

+
222 {
223  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
224  m_GraphBinary.size());
225  BOOST_CHECK_THROW(TfLiteParserImpl::GetInputs(model, 2, 0), armnn::ParseException);
226 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+ +
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [8/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetOutputsInvalidSubgraph ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 228 of file GetInputsOutputs.cpp.

+
229 {
230  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
231  m_GraphBinary.size());
232  BOOST_CHECK_THROW(TfLiteParserImpl::GetOutputs(model, 2, 0), armnn::ParseException);
233 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+ +
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [9/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetInputsInvalidOperator ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 235 of file GetInputsOutputs.cpp.

+
236 {
237  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
238  m_GraphBinary.size());
239  BOOST_CHECK_THROW(TfLiteParserImpl::GetInputs(model, 0, 1), armnn::ParseException);
240 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+ +
+
+
+ +

◆ BOOST_FIXTURE_TEST_CASE() [10/10]

+ +
+
+ + + + + + + + + + + + + + + + + + +
BOOST_FIXTURE_TEST_CASE (GetOutputsInvalidOperator ,
GetInputsOutputsFixture  
)
+
+ +

Definition at line 242 of file GetInputsOutputs.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END().

+
243 {
244  TfLiteParserImpl::ModelPtr model = TfLiteParserImpl::LoadModelFromBinary(m_GraphBinary.data(),
245  m_GraphBinary.size());
246  BOOST_CHECK_THROW(TfLiteParserImpl::GetOutputs(model, 0, 1), armnn::ParseException);
247 }
std::unique_ptr< onnx::ModelProto > ModelPtr
+ +
+
+
+
+
+ + + + -- cgit v1.2.1