Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: src/armnnConverter/ArmnnConverter.cpp File Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('_armnn_converter_8cpp.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#func-members">Functions</a> </div> |
| 85 | <div class="headertitle"> |
| 86 | <div class="title">ArmnnConverter.cpp File Reference</div> </div> |
| 87 | </div><!--header--> |
| 88 | <div class="contents"> |
| 89 | <div class="textblock"><code>#include <<a class="el" href="_logging_8hpp_source.html">armnn/Logging.hpp</a>></code><br /> |
| 90 | <code>#include <<a class="el" href="_heap_profiling_8hpp_source.html">HeapProfiling.hpp</a>></code><br /> |
| 91 | <code>#include <boost/format.hpp></code><br /> |
| 92 | <code>#include <boost/algorithm/string/split.hpp></code><br /> |
| 93 | <code>#include <boost/algorithm/string/classification.hpp></code><br /> |
| 94 | <code>#include <boost/program_options.hpp></code><br /> |
| 95 | <code>#include <cstdlib></code><br /> |
| 96 | <code>#include <fstream></code><br /> |
| 97 | <code>#include <iostream></code><br /> |
| 98 | </div> |
| 99 | <p><a href="_armnn_converter_8cpp_source.html">Go to the source code of this file.</a></p> |
| 100 | <table class="memberdecls"> |
| 101 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 102 | Functions</h2></td></tr> |
| 103 | <tr class="memitem:ac0f2228420376f4db7e1274f2b41667c"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="_armnn_converter_8cpp.html#ac0f2228420376f4db7e1274f2b41667c">main</a> (int argc, const char *argv[])</td></tr> |
| 104 | <tr class="separator:ac0f2228420376f4db7e1274f2b41667c"><td class="memSeparator" colspan="2"> </td></tr> |
| 105 | </table> |
| 106 | <h2 class="groupheader">Function Documentation</h2> |
| 107 | <a id="ac0f2228420376f4db7e1274f2b41667c"></a> |
| 108 | <h2 class="memtitle"><span class="permalink"><a href="#ac0f2228420376f4db7e1274f2b41667c">◆ </a></span>main()</h2> |
| 109 | |
| 110 | <div class="memitem"> |
| 111 | <div class="memproto"> |
| 112 | <table class="memname"> |
| 113 | <tr> |
| 114 | <td class="memname">int main </td> |
| 115 | <td>(</td> |
| 116 | <td class="paramtype">int </td> |
| 117 | <td class="paramname"><em>argc</em>, </td> |
| 118 | </tr> |
| 119 | <tr> |
| 120 | <td class="paramkey"></td> |
| 121 | <td></td> |
| 122 | <td class="paramtype">const char * </td> |
| 123 | <td class="paramname"><em>argv</em>[] </td> |
| 124 | </tr> |
| 125 | <tr> |
| 126 | <td></td> |
| 127 | <td>)</td> |
| 128 | <td></td><td></td> |
| 129 | </tr> |
| 130 | </table> |
| 131 | </div><div class="memdoc"> |
| 132 | |
| 133 | <p class="definition">Definition at line <a class="el" href="_armnn_converter_8cpp_source.html#l00359">359</a> of file <a class="el" href="_armnn_converter_8cpp_source.html">ArmnnConverter.cpp</a>.</p> |
| 134 | |
| 135 | <p class="reference">References <a class="el" href="_logging_8hpp_source.html#l00163">ARMNN_LOG</a>, <a class="el" href="_utils_8cpp_source.html#l00010">armnn::ConfigureLogging()</a>, <a class="el" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::Debug</a>, <a class="el" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875">armnn::Info</a>, and <a class="el" href="_exceptions_8cpp_source.html#l00032">Exception::what()</a>.</p> |
| 136 | <div class="fragment"><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> {</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span> </div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span> <span class="preprocessor">#if (!defined(ARMNN_CAFFE_PARSER) \</span></div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span> <span class="preprocessor"> && !defined(ARMNN_ONNX_PARSER) \</span></div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span> <span class="preprocessor"> && !defined(ARMNN_TF_PARSER) \</span></div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span> <span class="preprocessor"> && !defined(ARMNN_TF_LITE_PARSER))</span></div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with any of the supported parsers, Caffe, Onnx, Tensorflow, or TfLite."</span>;</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span> </div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> <span class="preprocessor">#if !defined(ARMNN_SERIALIZER)</span></div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with Serializer support."</span>;</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span> </div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span> <span class="preprocessor">#ifdef NDEBUG</span></div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <a class="code" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a> level = <a class="code" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875">armnn::LogSeverity::Info</a>;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  <a class="code" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a> level = <a class="code" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a>;</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span> </div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <a class="code" href="namespacearmnn.html#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a>(<span class="keyword">true</span>, <span class="keyword">true</span>, level);</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span> </div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  std::string modelFormat;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  std::string modelPath;</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span> </div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  std::vector<std::string> inputNames;</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  std::vector<std::string> inputTensorShapeStrs;</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  std::vector<armnn::TensorShape> inputTensorShapes;</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span> </div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  std::vector<std::string> outputNames;</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  std::string outputPath;</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span> </div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  <span class="keywordtype">bool</span> isModelBinary = <span class="keyword">true</span>;</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span> </div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="keywordflow">if</span> (ParseCommandLineArgs(</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  argc, argv, modelFormat, modelPath, inputNames, inputTensorShapeStrs, outputNames, outputPath, isModelBinary)</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  != EXIT_SUCCESS)</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  {</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  }</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span> </div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& shapeStr : inputTensorShapeStrs)</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  {</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">if</span> (!shapeStr.empty())</div><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  {</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  std::stringstream ss(shapeStr);</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span> </div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  <a class="code" href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a> shape = ParseTensorShape(ss);</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  inputTensorShapes.push_back(shape);</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  }</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.html">armnn::InvalidArgumentException</a>& e)</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  {</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Cannot create tensor shape: "</span> << e.<a class="code" href="classarmnn_1_1_exception.html#abf843cbb29dec939d0731e491bab6f70">what</a>();</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  }</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>  }</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>  }</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span> </div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>  ArmnnConverter converter(modelPath, inputNames, inputTensorShapes, outputNames, outputPath, isModelBinary);</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span> </div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  <span class="keywordflow">if</span> (modelFormat.find(<span class="stringliteral">"caffe"</span>) != std::string::npos)</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  {</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span> <span class="preprocessor">#if defined(ARMNN_CAFFE_PARSER)</span></div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>  <span class="keywordflow">if</span> (!converter.CreateNetwork<<a class="code" href="classarmnn_caffe_parser_1_1_i_caffe_parser.html">armnnCaffeParser::ICaffeParser</a>>())</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  {</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Failed to load model from file"</span>;</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>  }</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with Caffe parser support."</span>;</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  }</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (modelFormat.find(<span class="stringliteral">"onnx"</span>) != std::string::npos)</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>  {</div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span> <span class="preprocessor">#if defined(ARMNN_ONNX_PARSER)</span></div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="keywordflow">if</span> (!converter.CreateNetwork<<a class="code" href="classarmnn_onnx_parser_1_1_i_onnx_parser.html">armnnOnnxParser::IOnnxParser</a>>())</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  {</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Failed to load model from file"</span>;</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  }</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with Onnx parser support."</span>;</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  }</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (modelFormat.find(<span class="stringliteral">"tensorflow"</span>) != std::string::npos)</div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  {</div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span> <span class="preprocessor">#if defined(ARMNN_TF_PARSER)</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keywordflow">if</span> (!converter.CreateNetwork<<a class="code" href="classarmnn_tf_parser_1_1_i_tf_parser.html">armnnTfParser::ITfParser</a>>())</div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  {</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Failed to load model from file"</span>;</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  }</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with Tensorflow parser support."</span>;</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  }</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (modelFormat.find(<span class="stringliteral">"tflite"</span>) != std::string::npos)</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  {</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span> <span class="preprocessor">#if defined(ARMNN_TF_LITE_PARSER)</span></div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  <span class="keywordflow">if</span> (!isModelBinary)</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>  {</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Unknown model format: '"</span> << modelFormat << <span class="stringliteral">"'. Only 'binary' format supported \</span></div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span> <span class="stringliteral"> for tflite files"</span>;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  }</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span> </div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  <span class="keywordflow">if</span> (!converter.CreateNetwork<<a class="code" href="classarmnn_tf_lite_parser_1_1_i_tf_lite_parser.html">armnnTfLiteParser::ITfLiteParser</a>>())</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  {</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Failed to load model from file"</span>;</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  }</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span> <span class="preprocessor">#else</span></div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Not built with TfLite parser support."</span>;</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  }</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  {</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Unknown model format: '"</span> << modelFormat << <span class="stringliteral">"'"</span>;</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>  }</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span> </div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  <span class="keywordflow">if</span> (!converter.Serialize())</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  {</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  <a class="code" href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Failed to serialize model"</span>;</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  }</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span> </div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  <span class="keywordflow">return</span> EXIT_SUCCESS;</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span> }</div><div class="ttc" id="namespacearmnn_html_aa59f7a819c3e29d10ffc41e5c0616872"><div class="ttname"><a href="namespacearmnn.html#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a></div><div class="ttdeci">void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity)</div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.html#l00010">Utils.cpp:10</a></div></div> |
| 137 | <div class="ttc" id="classarmnn_1_1_invalid_argument_exception_html"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.html">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00080">Exceptions.hpp:80</a></div></div> |
| 138 | <div class="ttc" id="_logging_8hpp_html_a7b6ad073975f437ec38ca7d20154727f"><div class="ttname"><a href="_logging_8hpp.html#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a></div><div class="ttdeci">#define ARMNN_LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="_logging_8hpp_source.html#l00163">Logging.hpp:163</a></div></div> |
| 139 | <div class="ttc" id="classarmnn_1_1_exception_html_abf843cbb29dec939d0731e491bab6f70"><div class="ttname"><a href="classarmnn_1_1_exception.html#abf843cbb29dec939d0731e491bab6f70">armnn::Exception::what</a></div><div class="ttdeci">virtual const char * what() const noexcept override</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8cpp_source.html#l00032">Exceptions.cpp:32</a></div></div> |
| 140 | <div class="ttc" id="namespacearmnn_html_a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba"><div class="ttname"><a href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a></div></div> |
| 141 | <div class="ttc" id="namespacearmnn_html_a93a3ba385cad27c4774e5fe64c025d3d"><div class="ttname"><a href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a></div><div class="ttdeci">LogSeverity</div><div class="ttdef"><b>Definition:</b> <a href="_utils_8hpp_source.html#l00012">Utils.hpp:12</a></div></div> |
| 142 | <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div> |
| 143 | <div class="ttc" id="namespacearmnn_html_a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875"><div class="ttname"><a href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3da4059b0251f66a18cb56f544728796875">armnn::LogSeverity::Info</a></div></div> |
| 144 | <div class="ttc" id="classarmnn_tf_parser_1_1_i_tf_parser_html"><div class="ttname"><a href="classarmnn_tf_parser_1_1_i_tf_parser.html">armnnTfParser::ITfParser</a></div><div class="ttdoc">Parses a directed acyclic graph from a tensorflow protobuf file. </div><div class="ttdef"><b>Definition:</b> <a href="_i_tf_parser_8hpp_source.html#l00025">ITfParser.hpp:25</a></div></div> |
| 145 | <div class="ttc" id="classarmnn_onnx_parser_1_1_i_onnx_parser_html"><div class="ttname"><a href="classarmnn_onnx_parser_1_1_i_onnx_parser.html">armnnOnnxParser::IOnnxParser</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_onnx_parser_8hpp_source.html#l00022">IOnnxParser.hpp:22</a></div></div> |
| 146 | <div class="ttc" id="classarmnn_caffe_parser_1_1_i_caffe_parser_html"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_i_caffe_parser.html">armnnCaffeParser::ICaffeParser</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_caffe_parser_8hpp_source.html#l00024">ICaffeParser.hpp:24</a></div></div> |
| 147 | <div class="ttc" id="classarmnn_tf_lite_parser_1_1_i_tf_lite_parser_html"><div class="ttname"><a href="classarmnn_tf_lite_parser_1_1_i_tf_lite_parser.html">armnnTfLiteParser::ITfLiteParser</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_tf_lite_parser_8hpp_source.html#l00025">ITfLiteParser.hpp:25</a></div></div> |
| 148 | </div><!-- fragment --> |
| 149 | </div> |
| 150 | </div> |
| 151 | </div><!-- contents --> |
| 152 | </div><!-- doc-content --> |
| 153 | <!-- start footer part --> |
| 154 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 155 | <ul> |
| 156 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_1cecd92008b1a3747ae7e54827a5b075.html">armnnConverter</a></li><li class="navelem"><a class="el" href="_armnn_converter_8cpp.html">ArmnnConverter.cpp</a></li> |
| 157 | <li class="footer">Generated on Fri Mar 13 2020 16:06:59 for ArmNN by |
| 158 | <a href="http://www.doxygen.org/index.html"> |
| 159 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 160 | </ul> |
| 161 | </div> |
| 162 | </body> |
| 163 | </html> |