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/_create_network_8cpp.xhtml | 206 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 206 insertions(+) create mode 100644 20.02/_create_network_8cpp.xhtml (limited to '20.02/_create_network_8cpp.xhtml') diff --git a/20.02/_create_network_8cpp.xhtml b/20.02/_create_network_8cpp.xhtml new file mode 100644 index 0000000000..568364141d --- /dev/null +++ b/20.02/_create_network_8cpp.xhtml @@ -0,0 +1,206 @@ + + + + + + + + + + + + + +ArmNN: src/armnnOnnxParser/test/CreateNetwork.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  20.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
CreateNetwork.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "armnnOnnxParser/IOnnxParser.hpp"
+#include "google/protobuf/stubs/logging.h"
+
+

Go to the source code of this file.

+ + + + + + + + +

+Functions

 BOOST_AUTO_TEST_CASE (CreateNetworkFromString)
 
 BOOST_AUTO_TEST_CASE (CreateNetworkFromStringWithNullptr)
 
 BOOST_AUTO_TEST_CASE (CreateNetworkWithInvalidString)
 
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE() [1/3]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (CreateNetworkFromString )
+
+ +

Definition at line 12 of file CreateNetwork.cpp.

+ +

References IOnnxParser::Create().

+
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 }
static IOnnxParserPtr Create()
Definition: OnnxParser.cpp:424
+
std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr
Definition: INetwork.hpp:101
+
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:20
+
+
+
+ +

◆ BOOST_AUTO_TEST_CASE() [2/3]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (CreateNetworkFromStringWithNullptr )
+
+ +

Definition at line 49 of file CreateNetwork.cpp.

+ +

References IOnnxParser::Create().

+
50 {
52  BOOST_CHECK_THROW(parser->CreateNetworkFromString(""), armnn::InvalidArgumentException );
53 }
+
static IOnnxParserPtr Create()
Definition: OnnxParser.cpp:424
+
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:20
+
+
+
+ +

◆ BOOST_AUTO_TEST_CASE() [3/3]

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (CreateNetworkWithInvalidString )
+
+ +

Definition at line 55 of file CreateNetwork.cpp.

+ +

References BOOST_AUTO_TEST_SUITE_END(), and IOnnxParser::Create().

+
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 }
+
static IOnnxParserPtr Create()
Definition: OnnxParser.cpp:424
+
std::unique_ptr< IOnnxParser, void(*)(IOnnxParser *parser)> IOnnxParserPtr
Definition: IOnnxParser.hpp:20
+
+
+
+
+
+ + + + -- cgit v1.2.1