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 --- 21.02/_create_network_8cpp_source.xhtml | 122 ++++++++++++++++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 21.02/_create_network_8cpp_source.xhtml (limited to '21.02/_create_network_8cpp_source.xhtml') diff --git a/21.02/_create_network_8cpp_source.xhtml b/21.02/_create_network_8cpp_source.xhtml new file mode 100644 index 0000000000..8cacde6c68 --- /dev/null +++ b/21.02/_create_network_8cpp_source.xhtml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + +ArmNN: src/armnnOnnxParser/test/CreateNetwork.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
CreateNetwork.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include <boost/test/unit_test.hpp>
8 #include "google/protobuf/stubs/logging.h"
9 
10 BOOST_AUTO_TEST_SUITE(OnnxParser)
11 
12 BOOST_AUTO_TEST_CASE(CreateNetworkFromString)
13 {
14  std::string TestModel = R"(
15  ir_version: 3
16  producer_name: "CNTK "
17  producer_version: "2.5.1 "
18  domain: "ai.cntk "
19  model_version: 1
20  graph {
21  name: "CNTKGraph "
22  output {
23  name: "Output"
24  type {
25  tensor_type {
26  elem_type: 1
27  shape {
28  dim {
29  dim_value: 1
30  }
31  dim {
32  dim_value: 10
33  }
34  }
35  }
36  }
37  }
38  }
39  opset_import {
40  version: 7
41  })";
42 
44 
45  armnn::INetworkPtr network = parser->CreateNetworkFromString(TestModel.c_str());
46  BOOST_TEST(network.get());
47 }
48 
49 BOOST_AUTO_TEST_CASE(CreateNetworkFromStringWithNullptr)
50 {
52  BOOST_CHECK_THROW(parser->CreateNetworkFromString(""), armnn::InvalidArgumentException );
53 }
54 
55 BOOST_AUTO_TEST_CASE(CreateNetworkWithInvalidString)
56 {
57  auto silencer = google::protobuf::LogSilencer(); //get rid of errors from protobuf
59  BOOST_CHECK_THROW(parser->CreateNetworkFromString( "I'm not a model so I should raise an error" ),
61 }
62 
BOOST_AUTO_TEST_SUITE(TensorflowLiteParser)
+
BOOST_AUTO_TEST_CASE(CreateNetworkFromString)
+ + +
BOOST_AUTO_TEST_SUITE_END()
+ +
static IOnnxParserPtr Create()
Definition: OnnxParser.cpp:36
+
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:173
+
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:21
+
+
+ + + + -- cgit v1.2.1