Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: tests/ModelAccuracyTool-Armnn/ModelAccuracyTool-Armnn.cpp File Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('_model_accuracy_tool-_armnn_8cpp.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#func-members">Functions</a> </div> |
| 99 | <div class="headertitle"> |
| 100 | <div class="title">ModelAccuracyTool-Armnn.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include "<a class="el" href="_image_tensor_generator_8hpp_source.xhtml">../ImageTensorGenerator/ImageTensorGenerator.hpp</a>"</code><br /> |
| 104 | <code>#include "<a class="el" href="_inference_test_8hpp_source.xhtml">../InferenceTest.hpp</a>"</code><br /> |
| 105 | <code>#include "<a class="el" href="_model_accuracy_checker_8hpp_source.xhtml">ModelAccuracyChecker.hpp</a>"</code><br /> |
| 106 | <code>#include "<a class="el" href="_i_deserializer_8hpp_source.xhtml">armnnDeserializer/IDeserializer.hpp</a>"</code><br /> |
| 107 | <code>#include <boost/algorithm/string.hpp></code><br /> |
| 108 | <code>#include <boost/filesystem.hpp></code><br /> |
| 109 | <code>#include <boost/program_options/variables_map.hpp></code><br /> |
| 110 | <code>#include <boost/range/iterator_range.hpp></code><br /> |
| 111 | <code>#include <map></code><br /> |
| 112 | </div> |
| 113 | <p><a href="_model_accuracy_tool-_armnn_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 114 | <table class="memberdecls"> |
| 115 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 116 | Functions</h2></td></tr> |
| 117 | <tr class="memitem:a6bf14e4292511ab535ca9c3df0870185"><td class="memItemLeft" align="right" valign="top">map< std::string, std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="_model_accuracy_tool-_armnn_8cpp.xhtml#a6bf14e4292511ab535ca9c3df0870185">LoadValidationImageFilenamesAndLabels</a> (const string &validationLabelPath, const string &imageDirectoryPath, size_t begIndex=0, size_t endIndex=0, const string &blacklistPath="")</td></tr> |
| 118 | <tr class="memdesc:a6bf14e4292511ab535ca9c3df0870185"><td class="mdescLeft"> </td><td class="mdescRight">Load image names and ground-truth labels from the image directory and the ground truth label file. <a href="#a6bf14e4292511ab535ca9c3df0870185">More...</a><br /></td></tr> |
| 119 | <tr class="separator:a6bf14e4292511ab535ca9c3df0870185"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | <tr class="memitem:a0860c525c02a295d28f4fe0a0c0747c6"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="namespacearmnn_utils.xhtml#ab175d8bf2482d5a39c2331d1f0ddcece">armnnUtils::LabelCategoryNames</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="_model_accuracy_tool-_armnn_8cpp.xhtml#a0860c525c02a295d28f4fe0a0c0747c6">LoadModelOutputLabels</a> (const std::string &modelOutputLabelsPath)</td></tr> |
| 121 | <tr class="memdesc:a0860c525c02a295d28f4fe0a0c0747c6"><td class="mdescLeft"> </td><td class="mdescRight">Load model output labels from file. <a href="#a0860c525c02a295d28f4fe0a0c0747c6">More...</a><br /></td></tr> |
| 122 | <tr class="separator:a0860c525c02a295d28f4fe0a0c0747c6"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:a0ddf1224851353fc92bfbff6f499fa97"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="_model_accuracy_tool-_armnn_8cpp.xhtml#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr> |
| 124 | <tr class="separator:a0ddf1224851353fc92bfbff6f499fa97"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | </table> |
| 126 | <h2 class="groupheader">Function Documentation</h2> |
| 127 | <a id="a0860c525c02a295d28f4fe0a0c0747c6"></a> |
| 128 | <h2 class="memtitle"><span class="permalink"><a href="#a0860c525c02a295d28f4fe0a0c0747c6">◆ </a></span>LoadModelOutputLabels()</h2> |
| 129 | |
| 130 | <div class="memitem"> |
| 131 | <div class="memproto"> |
| 132 | <table class="memname"> |
| 133 | <tr> |
| 134 | <td class="memname">std::vector< <a class="el" href="namespacearmnn_utils.xhtml#ab175d8bf2482d5a39c2331d1f0ddcece">armnnUtils::LabelCategoryNames</a> > LoadModelOutputLabels </td> |
| 135 | <td>(</td> |
| 136 | <td class="paramtype">const std::string & </td> |
| 137 | <td class="paramname"><em>modelOutputLabelsPath</em></td><td>)</td> |
| 138 | <td></td> |
| 139 | </tr> |
| 140 | </table> |
| 141 | </div><div class="memdoc"> |
| 142 | |
| 143 | <p>Load model output labels from file. </p> |
| 144 | <dl class="section pre"><dt>Precondition</dt><dd><code>modelOutputLabelsPath</code> exists and is a regular file</dd></dl> |
| 145 | <dl class="params"><dt>Parameters</dt><dd> |
| 146 | <table class="params"> |
| 147 | <tr><td class="paramdir">[in]</td><td class="paramname">modelOutputLabelsPath</td><td>path to model output labels file </td></tr> |
| 148 | </table> |
| 149 | </dd> |
| 150 | </dl> |
| 151 | <dl class="section return"><dt>Returns</dt><dd>A vector of labels, which in turn is described by a list of category names </dd></dl> |
| 152 | |
| 153 | <p class="definition">Definition at line <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00466">466</a> of file <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml">ModelAccuracyTool-Armnn.cpp</a>.</p> |
| 154 | |
| 155 | <p class="reference">References <a class="el" href="_model_accuracy_checker_8cpp_source.xhtml#l00041">armnnUtils::SplitBy()</a>, and <a class="el" href="_model_accuracy_checker_8cpp_source.xhtml#l00065">armnnUtils::Strip()</a>.</p> |
| 156 | |
| 157 | <p class="reference">Referenced by <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00049">main()</a>.</p> |
| 158 | <div class="fragment"><div class="line"><a name="l00467"></a><span class="lineno"> 467</span> {</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>  std::vector<armnnUtils::LabelCategoryNames> modelOutputLabels;</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  ifstream modelOutputLablesFile(modelOutputLabelsPath);</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  std::string line;</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  <span class="keywordflow">while</span> (std::getline(modelOutputLablesFile, line))</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  {</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  <a class="code" href="namespacearmnn_utils.xhtml#ab175d8bf2482d5a39c2331d1f0ddcece">armnnUtils::LabelCategoryNames</a> tokens = <a class="code" href="namespacearmnn_utils.xhtml#a158a68b143d2564fa1ca047646cf4185">armnnUtils::SplitBy</a>(line, <span class="stringliteral">":"</span>);</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  <a class="code" href="namespacearmnn_utils.xhtml#ab175d8bf2482d5a39c2331d1f0ddcece">armnnUtils::LabelCategoryNames</a> predictionCategoryNames = <a class="code" href="namespacearmnn_utils.xhtml#a158a68b143d2564fa1ca047646cf4185">armnnUtils::SplitBy</a>(tokens.back(), <span class="stringliteral">","</span>);</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span>  std::transform(predictionCategoryNames.begin(), predictionCategoryNames.end(), predictionCategoryNames.begin(),</div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  [](<span class="keyword">const</span> std::string& category) { <span class="keywordflow">return</span> <a class="code" href="namespacearmnn_utils.xhtml#a14be0364a6fc0975d45e84737dfe21bc">armnnUtils::Strip</a>(category); });</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  modelOutputLabels.push_back(predictionCategoryNames);</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span>  }</div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  <span class="keywordflow">return</span> modelOutputLabels;</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span> }</div><div class="ttc" id="namespacearmnn_utils_xhtml_a14be0364a6fc0975d45e84737dfe21bc"><div class="ttname"><a href="namespacearmnn_utils.xhtml#a14be0364a6fc0975d45e84737dfe21bc">armnnUtils::Strip</a></div><div class="ttdeci">std::string Strip(const std::string &originalString, const std::string &characterSet)</div><div class="ttdoc">Remove any preceding and trailing character specified in the characterSet. </div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_8cpp_source.xhtml#l00065">ModelAccuracyChecker.cpp:65</a></div></div> |
| 159 | <div class="ttc" id="namespacearmnn_utils_xhtml_a158a68b143d2564fa1ca047646cf4185"><div class="ttname"><a href="namespacearmnn_utils.xhtml#a158a68b143d2564fa1ca047646cf4185">armnnUtils::SplitBy</a></div><div class="ttdeci">std::vector< std::string > SplitBy(const std::string &originalString, const std::string &delimiter, bool includeEmptyToken)</div><div class="ttdoc">Split a string into tokens by a delimiter. </div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_8cpp_source.xhtml#l00041">ModelAccuracyChecker.cpp:41</a></div></div> |
| 160 | <div class="ttc" id="namespacearmnn_utils_xhtml_ab175d8bf2482d5a39c2331d1f0ddcece"><div class="ttname"><a href="namespacearmnn_utils.xhtml#ab175d8bf2482d5a39c2331d1f0ddcece">armnnUtils::LabelCategoryNames</a></div><div class="ttdeci">std::vector< std::string > LabelCategoryNames</div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_8hpp_source.xhtml#l00025">ModelAccuracyChecker.hpp:25</a></div></div> |
| 161 | </div><!-- fragment --> |
| 162 | </div> |
| 163 | </div> |
| 164 | <a id="a6bf14e4292511ab535ca9c3df0870185"></a> |
| 165 | <h2 class="memtitle"><span class="permalink"><a href="#a6bf14e4292511ab535ca9c3df0870185">◆ </a></span>LoadValidationImageFilenamesAndLabels()</h2> |
| 166 | |
| 167 | <div class="memitem"> |
| 168 | <div class="memproto"> |
| 169 | <table class="memname"> |
| 170 | <tr> |
| 171 | <td class="memname">map< std::string, std::string > LoadValidationImageFilenamesAndLabels </td> |
| 172 | <td>(</td> |
| 173 | <td class="paramtype">const string & </td> |
| 174 | <td class="paramname"><em>validationLabelPath</em>, </td> |
| 175 | </tr> |
| 176 | <tr> |
| 177 | <td class="paramkey"></td> |
| 178 | <td></td> |
| 179 | <td class="paramtype">const string & </td> |
| 180 | <td class="paramname"><em>imageDirectoryPath</em>, </td> |
| 181 | </tr> |
| 182 | <tr> |
| 183 | <td class="paramkey"></td> |
| 184 | <td></td> |
| 185 | <td class="paramtype">size_t </td> |
| 186 | <td class="paramname"><em>begIndex</em> = <code>0</code>, </td> |
| 187 | </tr> |
| 188 | <tr> |
| 189 | <td class="paramkey"></td> |
| 190 | <td></td> |
| 191 | <td class="paramtype">size_t </td> |
| 192 | <td class="paramname"><em>endIndex</em> = <code>0</code>, </td> |
| 193 | </tr> |
| 194 | <tr> |
| 195 | <td class="paramkey"></td> |
| 196 | <td></td> |
| 197 | <td class="paramtype">const string & </td> |
| 198 | <td class="paramname"><em>blacklistPath</em> = <code>""</code> </td> |
| 199 | </tr> |
| 200 | <tr> |
| 201 | <td></td> |
| 202 | <td>)</td> |
| 203 | <td></td><td></td> |
| 204 | </tr> |
| 205 | </table> |
| 206 | </div><div class="memdoc"> |
| 207 | |
| 208 | <p>Load image names and ground-truth labels from the image directory and the ground truth label file. </p> |
| 209 | <dl class="section pre"><dt>Precondition</dt><dd><code>validationLabelPath</code> exists and is valid regular file </dd> |
| 210 | <dd> |
| 211 | <code>imageDirectoryPath</code> exists and is valid directory </dd> |
| 212 | <dd> |
| 213 | labels in validation file correspond to images which are in lexicographical order with the image name </dd> |
| 214 | <dd> |
| 215 | image index starts at 1 </dd> |
| 216 | <dd> |
| 217 | <code>begIndex</code> and <code>endIndex</code> are end-inclusive</dd></dl> |
| 218 | <dl class="params"><dt>Parameters</dt><dd> |
| 219 | <table class="params"> |
| 220 | <tr><td class="paramdir">[in]</td><td class="paramname">validationLabelPath</td><td>Path to validation label file </td></tr> |
| 221 | <tr><td class="paramdir">[in]</td><td class="paramname">imageDirectoryPath</td><td>Path to directory containing validation images </td></tr> |
| 222 | <tr><td class="paramdir">[in]</td><td class="paramname">begIndex</td><td>Begin index of images to be loaded. Inclusive </td></tr> |
| 223 | <tr><td class="paramdir">[in]</td><td class="paramname">endIndex</td><td>End index of images to be loaded. Inclusive </td></tr> |
| 224 | <tr><td class="paramdir">[in]</td><td class="paramname">blacklistPath</td><td>Path to blacklist file </td></tr> |
| 225 | </table> |
| 226 | </dd> |
| 227 | </dl> |
| 228 | <dl class="section return"><dt>Returns</dt><dd>A map mapping image file names to their corresponding ground-truth labels </dd></dl> |
| 229 | |
| 230 | <p class="definition">Definition at line <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00388">388</a> of file <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml">ModelAccuracyTool-Armnn.cpp</a>.</p> |
| 231 | |
| 232 | <p class="reference">Referenced by <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00049">main()</a>.</p> |
| 233 | <div class="fragment"><div class="line"><a name="l00393"></a><span class="lineno"> 393</span> {</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  <span class="comment">// Populate imageFilenames with names of all .JPEG, .PNG images</span></div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  std::vector<std::string> imageFilenames;</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& imageEntry :</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  boost::make_iterator_range(boost::filesystem::directory_iterator(boost::filesystem::path(imageDirectoryPath))))</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>  boost::filesystem::path imagePath = imageEntry.path();</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  std::string imageExtension = boost::to_upper_copy<std::string>(imagePath.extension().string());</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  <span class="keywordflow">if</span> (boost::filesystem::is_regular_file(imagePath) && (imageExtension == <span class="stringliteral">".JPEG"</span> || imageExtension == <span class="stringliteral">".PNG"</span>))</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  {</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  imageFilenames.push_back(imagePath.filename().string());</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  }</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>  <span class="keywordflow">if</span> (imageFilenames.empty())</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">throw</span> <a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>(<span class="stringliteral">"No image file (JPEG, PNG) found at "</span> + imageDirectoryPath);</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> </div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <span class="comment">// Sort the image filenames lexicographically</span></div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  std::sort(imageFilenames.begin(), imageFilenames.end());</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span> </div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  std::cout << imageFilenames.size() << <span class="stringliteral">" images found at "</span> << imageDirectoryPath << std::endl;</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span> </div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <span class="comment">// Get default end index</span></div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>  <span class="keywordflow">if</span> (begIndex < 1 || endIndex > imageFilenames.size())</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>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>(<span class="stringliteral">"Invalid image index range"</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>  endIndex = endIndex == 0 ? imageFilenames.size() : endIndex;</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <span class="keywordflow">if</span> (begIndex > endIndex)</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>  {</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>(<span class="stringliteral">"Invalid image index range"</span>);</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  }</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  <span class="comment">// Load blacklist if there is one</span></div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  std::vector<unsigned int> blacklist;</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keywordflow">if</span> (!blacklistPath.empty())</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>  std::ifstream blacklistFile(blacklistPath);</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index;</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  <span class="keywordflow">while</span> (blacklistFile >> index)</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>  {</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  blacklist.push_back(index);</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  }</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> </div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  <span class="comment">// Load ground truth labels and pair them with corresponding image names</span></div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  std::string classification;</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span>  map<std::string, std::string> imageNameToLabel;</div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  ifstream infile(validationLabelPath);</div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span>  <span class="keywordtype">size_t</span> imageIndex = begIndex;</div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <span class="keywordtype">size_t</span> blacklistIndexCount = 0;</div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordflow">while</span> (std::getline(infile, classification))</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  {</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  <span class="keywordflow">if</span> (imageIndex > endIndex)</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">break</span>;</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="comment">// If current imageIndex is included in blacklist, skip the current image</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span>  <span class="keywordflow">if</span> (blacklistIndexCount < blacklist.size() && imageIndex == blacklist[blacklistIndexCount])</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>  ++imageIndex;</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>  ++blacklistIndexCount;</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  }</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>  imageNameToLabel.insert(std::pair<std::string, std::string>(imageFilenames[imageIndex - 1], classification));</div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  ++imageIndex;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  }</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  std::cout << blacklistIndexCount << <span class="stringliteral">" images blacklisted"</span> << std::endl;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  std::cout << imageIndex - begIndex - blacklistIndexCount << <span class="stringliteral">" images to be loaded"</span> << std::endl;</div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  <span class="keywordflow">return</span> imageNameToLabel;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span> }</div><div class="ttc" id="classarmnn_1_1_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_exception.xhtml">armnn::Exception</a></div><div class="ttdoc">Base class for all ArmNN exceptions so that users can filter to just those. </div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00046">Exceptions.hpp:46</a></div></div> |
| 234 | </div><!-- fragment --> |
| 235 | </div> |
| 236 | </div> |
| 237 | <a id="a0ddf1224851353fc92bfbff6f499fa97"></a> |
| 238 | <h2 class="memtitle"><span class="permalink"><a href="#a0ddf1224851353fc92bfbff6f499fa97">◆ </a></span>main()</h2> |
| 239 | |
| 240 | <div class="memitem"> |
| 241 | <div class="memproto"> |
| 242 | <table class="memname"> |
| 243 | <tr> |
| 244 | <td class="memname">int main </td> |
| 245 | <td>(</td> |
| 246 | <td class="paramtype">int </td> |
| 247 | <td class="paramname"><em>argc</em>, </td> |
| 248 | </tr> |
| 249 | <tr> |
| 250 | <td class="paramkey"></td> |
| 251 | <td></td> |
| 252 | <td class="paramtype">char * </td> |
| 253 | <td class="paramname"><em>argv</em>[] </td> |
| 254 | </tr> |
| 255 | <tr> |
| 256 | <td></td> |
| 257 | <td>)</td> |
| 258 | <td></td><td></td> |
| 259 | </tr> |
| 260 | </table> |
| 261 | </div><div class="memdoc"> |
| 262 | |
| 263 | <p class="definition">Definition at line <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00049">49</a> of file <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml">ModelAccuracyTool-Armnn.cpp</a>.</p> |
| 264 | |
| 265 | <p class="reference">References <a class="el" href="_logging_8hpp_source.xhtml#l00163">ARMNN_LOG</a>, <a class="el" href="_backend_registry_8cpp_source.xhtml#l00013">armnn::BackendRegistryInstance()</a>, <a class="el" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea4df6064eb76f848def300474b7aef0da">Caffe</a>, <a class="el" href="_utils_8cpp_source.xhtml#l00010">armnn::ConfigureLogging()</a>, <a class="el" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1">armnn::CpuAcc</a>, <a class="el" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64">armnn::CpuRef</a>, <a class="el" href="_runtime_8cpp_source.xhtml#l00032">IRuntime::Create()</a>, <a class="el" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::Debug</a>, <a class="el" href="_cl_end_to_end_tests_8cpp_source.xhtml#l00025">defaultBackends</a>, <a class="el" href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407acb5e100e5a9a3e7f6d1fd97512215282">armnn::error</a>, <a class="el" href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70bae139a585510a502bbf1841cf589f5086">armnn::Failure</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_backend_registry_8cpp_source.xhtml#l00076">BackendRegistry::GetBackendIdsAsString()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00514">InferenceModel< IParser, TDataType >::GetInputBindingInfo()</a>, <a class="el" href="_image_tensor_generator_8hpp_source.xhtml#l00039">GetNormalizationParameters()</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00455">InferenceModel< IParser, TDataType >::GetOutputSize()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00466">LoadModelOutputLabels()</a>, <a class="el" href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00388">LoadValidationImageFilenamesAndLabels()</a>, <a class="el" href="_i_deserializer_8hpp_source.xhtml#l00020">BindingPointInfo::m_BindingId</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00088">Params::m_ComputeDevices</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00085">Params::m_InputBindings</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00091">Params::m_IsModelBinary</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00084">Params::m_ModelPath</a>, <a class="el" href="_inference_model_8hpp_source.xhtml#l00087">Params::m_OutputBindings</a>, <a class="el" href="_i_deserializer_8hpp_source.xhtml#l00021">BindingPointInfo::m_TensorInfo</a>, <a class="el" href="_tensor_i_o_utils_8hpp_source.xhtml#l00017">armnnUtils::MakeInputTensors()</a>, <a class="el" href="_tensor_i_o_utils_8hpp_source.xhtml#l00056">armnnUtils::MakeOutputTensors()</a>, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::NCHW</a>, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>, <a class="el" href="_network_8cpp_source.xhtml#l00890">armnn::Optimize()</a>, <a class="el" href="_file_only_profiling_decorator_tests_8cpp_source.xhtml#l00045">options</a>, <a class="el" href="_image_tensor_generator_8hpp_source.xhtml#l00091">PrepareImageTensor< float >()</a>, <a class="el" href="_image_tensor_generator_8hpp_source.xhtml#l00128">PrepareImageTensor< int >()</a>, <a class="el" href="_image_tensor_generator_8hpp_source.xhtml#l00148">PrepareImageTensor< uint8_t >()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::QAsymmU8</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::Signed32</a>, <a class="el" href="_model_accuracy_checker_8cpp_source.xhtml#l00041">armnnUtils::SplitBy()</a>, <a class="el" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea074dd699710da0ec1eb45f13b31788e3">TensorFlow</a>, <a class="el" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea35120628a2097980f88fd49246124cae">TFLite</a>, <a class="el" href="_inference_test_8cpp_source.xhtml#l00092">armnn::test::ValidateDirectory()</a>, and <a class="el" href="_exceptions_8cpp_source.xhtml#l00032">Exception::what()</a>.</p> |
| 266 | <div class="fragment"><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  {</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">using namespace </span>boost::filesystem;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a> level = <a class="code" href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a>;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <a class="code" href="namespacearmnn.xhtml#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a>(<span class="keyword">true</span>, <span class="keyword">true</span>, level);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <span class="comment">// Set-up program Options</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  <span class="keyword">namespace </span>po = boost::program_options;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  std::vector<armnn::BackendId> computeDevice;</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  std::vector<armnn::BackendId> <a class="code" href="_cl_end_to_end_tests_8cpp.xhtml#ab59caffe2ee6be46c08766c055420f17">defaultBackends</a> = {<a class="code" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1">armnn::Compute::CpuAcc</a>, <a class="code" href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64">armnn::Compute::CpuRef</a>};</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  std::string modelPath;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  std::string modelFormat;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  std::string dataDir;</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  std::string inputName;</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  std::string inputLayout;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  std::string outputName;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  std::string modelOutputLabelsPath;</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  std::string validationLabelPath;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  std::string validationRange;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  std::string blacklistPath;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  <span class="keyword">const</span> std::string backendsMessage = <span class="stringliteral">"Which device to run layers on by default. Possible choices: "</span></div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  + <a class="code" href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a>().<a class="code" href="classarmnn_1_1_backend_registry.xhtml#ae1de2f7ca1db17f45f97155e239b8b45">GetBackendIdsAsString</a>();</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  po::options_description desc(<span class="stringliteral">"Options"</span>);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  {</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="comment">// Adds generic options needed to run Accuracy Tool.</span></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  desc.add_options()</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  (<span class="stringliteral">"help,h"</span>, <span class="stringliteral">"Display help messages"</span>)</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  (<span class="stringliteral">"model-path,m"</span>, po::value<std::string>(&modelPath)->required(), <span class="stringliteral">"Path to armnn format model file"</span>)</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  (<span class="stringliteral">"model-format,f"</span>, po::value<std::string>(&modelFormat)->required(),</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <span class="stringliteral">"The model format. Supported values: caffe, tensorflow, tflite"</span>)</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  (<span class="stringliteral">"input-name,i"</span>, po::value<std::string>(&inputName)->required(),</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  <span class="stringliteral">"Identifier of the input tensors in the network separated by comma."</span>)</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  (<span class="stringliteral">"output-name,o"</span>, po::value<std::string>(&outputName)->required(),</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <span class="stringliteral">"Identifier of the output tensors in the network separated by comma."</span>)</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  (<span class="stringliteral">"data-dir,d"</span>, po::value<std::string>(&dataDir)->required(),</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="stringliteral">"Path to directory containing the ImageNet test data"</span>)</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  (<span class="stringliteral">"model-output-labels,p"</span>, po::value<std::string>(&modelOutputLabelsPath)->required(),</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="stringliteral">"Path to model output labels file."</span>)</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  (<span class="stringliteral">"validation-labels-path,v"</span>, po::value<std::string>(&validationLabelPath)->required(),</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="stringliteral">"Path to ImageNet Validation Label file"</span>)</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  (<span class="stringliteral">"data-layout,l"</span>, po::value<std::string>(&inputLayout)->default_value(<span class="stringliteral">"NHWC"</span>),</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="stringliteral">"Data layout. Supported value: NHWC, NCHW. Default: NHWC"</span>)</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  (<span class="stringliteral">"compute,c"</span>, po::value<std::vector<armnn::BackendId>>(&computeDevice)->default_value(defaultBackends),</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  backendsMessage.c_str())</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  (<span class="stringliteral">"validation-range,r"</span>, po::value<std::string>(&validationRange)->default_value(<span class="stringliteral">"1:0"</span>),</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="stringliteral">"The range of the images to be evaluated. Specified in the form <begin index>:<end index>."</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <span class="stringliteral">"The index starts at 1 and the range is inclusive."</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="stringliteral">"By default the evaluation will be performed on all images."</span>)</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  (<span class="stringliteral">"blacklist-path,b"</span>, po::value<std::string>(&blacklistPath)->default_value(<span class="stringliteral">""</span>),</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="stringliteral">"Path to a blacklist file where each line denotes the index of an image to be "</span></div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <span class="stringliteral">"excluded from evaluation."</span>);</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception& e)</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  {</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="comment">// Coverity points out that default_value(...) can throw a bad_lexical_cast,</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <span class="comment">// and that desc.add_options() can throw boost::io::too_few_args.</span></div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  <span class="comment">// They really won't in any of these cases.</span></div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  BOOST_ASSERT_MSG(<span class="keyword">false</span>, <span class="stringliteral">"Caught unexpected exception"</span>);</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  std::cerr << <span class="stringliteral">"Fatal internal error: "</span> << e.what() << std::endl;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  }</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  po::variables_map vm;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  {</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  po::store(po::parse_command_line(argc, argv, desc), vm);</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> </div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <span class="keywordflow">if</span> (vm.count(<span class="stringliteral">"help"</span>))</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  {</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  std::cout << desc << std::endl;</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  }</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  po::notify(vm);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  }</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <span class="keywordflow">catch</span> (po::error& e)</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  {</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  std::cerr << e.what() << std::endl << std::endl;</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  std::cerr << desc << std::endl;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  <span class="comment">// Check if the requested backend are all valid</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  std::string invalidBackends;</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  <span class="keywordflow">if</span> (!CheckRequestedBackendsAreValid(computeDevice, <a class="code" href="classarmnn_1_1_optional.xhtml">armnn::Optional<std::string&></a>(invalidBackends)))</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  {</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"The list of preferred devices contains invalid backend IDs: "</span></div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  << invalidBackends;</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">return</span> EXIT_FAILURE;</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  }</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <a class="code" href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70b">armnn::Status</a> status;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> </div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <span class="comment">// Create runtime</span></div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a> <a class="code" href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a>;</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">armnn::IRuntimePtr</a> runtime(<a class="code" href="classarmnn_1_1_i_runtime.xhtml#ad44ecd3700748dc30dc4bbe34ba5bde7">armnn::IRuntime::Create</a>(options));</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  std::ifstream file(modelPath);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> </div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <span class="comment">// Create Parser</span></div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keyword">using</span> IParser = <a class="code" href="classarmnn_deserializer_1_1_i_deserializer.xhtml">armnnDeserializer::IDeserializer</a>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="keyword">auto</span> armnnparser(IParser::Create());</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span> </div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  <span class="comment">// Create a network</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <a class="code" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> network = armnnparser->CreateNetworkFromBinary(file);</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span> </div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="comment">// Optimizes the network.</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <a class="code" href="namespacearmnn.xhtml#a674efcf6cbdb9e831d653ff0e821fb38">armnn::IOptimizedNetworkPtr</a> optimizedNet(<span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  optimizedNet = <a class="code" href="namespacearmnn.xhtml#a82e98ef05fd67036d1195ba17174d685">armnn::Optimize</a>(*network, computeDevice, runtime->GetDeviceSpec());</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  }</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <span class="keywordflow">catch</span> (<a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a>& e)</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  {</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  std::stringstream message;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  message << <span class="stringliteral">"armnn::Exception ("</span> << e.<a class="code" href="classarmnn_1_1_exception.xhtml#abf843cbb29dec939d0731e491bab6f70">what</a>() << <span class="stringliteral">") caught from optimize."</span>;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << message.str();</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span> </div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="comment">// Loads the network into the runtime.</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  <a class="code" href="namespacearmnn.xhtml#a83015160d8c67d5d77735eb0d4033d9a">armnn::NetworkId</a> networkId;</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  status = runtime->LoadNetwork(networkId, std::move(optimizedNet));</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">if</span> (status == <a class="code" href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70bae139a585510a502bbf1841cf589f5086">armnn::Status::Failure</a>)</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"armnn::IRuntime: Failed to load network"</span>;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  }</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span> </div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="comment">// Set up Network</span></div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keyword">using</span> <a class="code" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> = <a class="code" href="namespace_inference_model_internal.xhtml#a9084adbf804022c874039ad40d1939e9">InferenceModelInternal::BindingPointInfo</a>;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keyword">const</span> <a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml">armnnDeserializer::BindingPointInfo</a>&</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  inputBindingInfo = armnnparser->GetNetworkInputBindingInfo(0, inputName);</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span> </div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  std::pair<armnn::LayerBindingId, armnn::TensorInfo></div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  m_InputBindingInfo(inputBindingInfo.<a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml#a663b3104ec65e4e08b5e37fb42942087">m_BindingId</a>, inputBindingInfo.<a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml#aa308d10e76e29f09e44a933a2d091a79">m_TensorInfo</a>);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  std::vector<BindingPointInfo> inputBindings = { m_InputBindingInfo };</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> </div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keyword">const</span> <a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml">armnnDeserializer::BindingPointInfo</a>&</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  outputBindingInfo = armnnparser->GetNetworkOutputBindingInfo(0, outputName);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span> </div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>  std::pair<armnn::LayerBindingId, armnn::TensorInfo></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  m_OutputBindingInfo(outputBindingInfo.<a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml#a663b3104ec65e4e08b5e37fb42942087">m_BindingId</a>, outputBindingInfo.<a class="code" href="structarmnn_deserializer_1_1_binding_point_info.xhtml#aa308d10e76e29f09e44a933a2d091a79">m_TensorInfo</a>);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  std::vector<BindingPointInfo> outputBindings = { m_OutputBindingInfo };</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  <span class="comment">// Load model output labels</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="keywordflow">if</span> (modelOutputLabelsPath.empty() || !boost::filesystem::exists(modelOutputLabelsPath) ||</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  !boost::filesystem::is_regular_file(modelOutputLabelsPath))</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  {</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Invalid model output labels path at "</span> << modelOutputLabelsPath;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  }</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  <span class="keyword">const</span> std::vector<armnnUtils::LabelCategoryNames> modelOutputLabels =</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  <a class="code" href="_model_accuracy_tool-_armnn_8cpp.xhtml#a0860c525c02a295d28f4fe0a0c0747c6">LoadModelOutputLabels</a>(modelOutputLabelsPath);</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="comment">// Parse begin and end image indices</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  std::vector<std::string> imageIndexStrs = <a class="code" href="namespacearmnn_utils.xhtml#a158a68b143d2564fa1ca047646cf4185">armnnUtils::SplitBy</a>(validationRange, <span class="stringliteral">":"</span>);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="keywordtype">size_t</span> imageBegIndex;</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  <span class="keywordtype">size_t</span> imageEndIndex;</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>  <span class="keywordflow">if</span> (imageIndexStrs.size() != 2)</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  {</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Invalid validation range specification: Invalid format "</span> << validationRange;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  }</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  {</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  imageBegIndex = std::stoul(imageIndexStrs[0]);</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  imageEndIndex = std::stoul(imageIndexStrs[1]);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  }</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception& e)</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  {</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Invalid validation range specification: "</span> << validationRange;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  }</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span> </div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  <span class="comment">// Validate blacklist file if it's specified</span></div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">if</span> (!blacklistPath.empty() &&</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  !(boost::filesystem::exists(blacklistPath) && boost::filesystem::is_regular_file(blacklistPath)))</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  {</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Invalid path to blacklist file at "</span> << blacklistPath;</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span> </div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  path pathToDataDir(dataDir);</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <span class="keyword">const</span> map<std::string, std::string> imageNameToLabel = <a class="code" href="_model_accuracy_tool-_armnn_8cpp.xhtml#a6bf14e4292511ab535ca9c3df0870185">LoadValidationImageFilenamesAndLabels</a>(</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  validationLabelPath, pathToDataDir.string(), imageBegIndex, imageEndIndex, blacklistPath);</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  <a class="code" href="classarmnn_utils_1_1_model_accuracy_checker.xhtml">armnnUtils::ModelAccuracyChecker</a> checker(imageNameToLabel, modelOutputLabels);</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <span class="keyword">using</span> <a class="code" href="_model_accuracy_checker_test_8cpp.xhtml#a9eb69ebdaf4ceb8014e7c8a540266100">TContainer</a> = boost::variant<std::vector<float>, std::vector<int>, std::vector<uint8_t>>;</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  <span class="keywordflow">if</span> (<a class="code" href="namespacearmnn_1_1test.xhtml#a8a678fb3a8864e31aeb77f857ae6fc43">ValidateDirectory</a>(dataDir))</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  <a class="code" href="struct_inference_model_internal_1_1_params.xhtml">InferenceModel<armnnDeserializer::IDeserializer, float>::Params</a> params;</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  params.<a class="code" href="struct_inference_model_internal_1_1_params.xhtml#a4fa312cf0d60fbd3988a7c76ab8e2980">m_ModelPath</a> = modelPath;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  params.<a class="code" href="struct_inference_model_internal_1_1_params.xhtml#a6bf2f586c403977d31c7d32d371918cf">m_IsModelBinary</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  params.<a class="code" href="struct_inference_model_internal_1_1_params.xhtml#a2d54e6252c1c9a0e29f7706ba03b2b74">m_ComputeDevices</a> = computeDevice;</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  params.<a class="code" href="struct_inference_model_internal_1_1_params.xhtml#aad2ac35d4cb83ee4da9fad5fbcb907e0">m_InputBindings</a>.push_back(inputName);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  params.<a class="code" href="struct_inference_model_internal_1_1_params.xhtml#abeacb4ed1ca9256ee0e8aea73185a0cc">m_OutputBindings</a>.push_back(outputName);</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span> </div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  <span class="keyword">using</span> TParser = <a class="code" href="classarmnn_deserializer_1_1_i_deserializer.xhtml">armnnDeserializer::IDeserializer</a>;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  <a class="code" href="class_inference_model.xhtml">InferenceModel<TParser, float></a> model(params, <span class="keyword">false</span>);</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <span class="comment">// Get input tensor information</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>& inputTensorInfo = model.GetInputBindingInfo().second;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a>& inputTensorShape = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>();</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">armnn::DataType</a>& inputTensorDataType = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#aea909c7327109228ef618d459015def3">GetDataType</a>();</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">armnn::DataLayout</a> inputTensorDataLayout;</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  <span class="keywordflow">if</span> (inputLayout == <span class="stringliteral">"NCHW"</span>)</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  {</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  inputTensorDataLayout = <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::DataLayout::NCHW</a>;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>  }</div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (inputLayout == <span class="stringliteral">"NHWC"</span>)</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  {</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  inputTensorDataLayout = <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::DataLayout::NHWC</a>;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  }</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  {</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Invalid Data layout: "</span> << inputLayout;</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  }</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputTensorWidth =</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  inputTensorDataLayout == <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::DataLayout::NCHW</a> ? inputTensorShape[3] : inputTensorShape[2];</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputTensorHeight =</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  inputTensorDataLayout == <a class="code" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::DataLayout::NCHW</a> ? inputTensorShape[2] : inputTensorShape[1];</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  <span class="comment">// Get output tensor info</span></div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputNumElements = model.GetOutputSize();</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="comment">// Check output tensor shape is valid</span></div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>  <span class="keywordflow">if</span> (modelOutputLabels.size() != outputNumElements)</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  {</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Number of output elements: "</span> << outputNumElements</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  << <span class="stringliteral">" , mismatches the number of output labels: "</span> << modelOutputLabels.size();</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>  }</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span> </div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> batchSize = 1;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  <span class="comment">// Get normalisation parameters</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  <a class="code" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563e">SupportedFrontend</a> modelFrontend;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  <span class="keywordflow">if</span> (modelFormat == <span class="stringliteral">"caffe"</span>)</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  {</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  modelFrontend = <a class="code" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea4df6064eb76f848def300474b7aef0da">SupportedFrontend::Caffe</a>;</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  }</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (modelFormat == <span class="stringliteral">"tensorflow"</span>)</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>  {</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  modelFrontend = <a class="code" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea074dd699710da0ec1eb45f13b31788e3">SupportedFrontend::TensorFlow</a>;</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  }</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (modelFormat == <span class="stringliteral">"tflite"</span>)</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  {</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  modelFrontend = <a class="code" href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea35120628a2097980f88fd49246124cae">SupportedFrontend::TFLite</a>;</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  }</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  {</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"Unsupported frontend: "</span> << modelFormat;</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  }</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  <span class="keyword">const</span> <a class="code" href="struct_normalization_parameters.xhtml">NormalizationParameters</a>& normParams = <a class="code" href="_image_tensor_generator_8hpp.xhtml#a572494250ece8d94b68ea490d0bf46e4">GetNormalizationParameters</a>(modelFrontend, inputTensorDataType);</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keyword">auto</span>& imageEntry : imageNameToLabel)</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  <span class="keyword">const</span> std::string imageName = imageEntry.first;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  std::cout << <span class="stringliteral">"Processing image: "</span> << imageName << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span> </div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  vector<TContainer> inputDataContainers;</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  vector<TContainer> outputDataContainers;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span> </div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  <span class="keyword">auto</span> imagePath = pathToDataDir / boost::filesystem::path(imageName);</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">switch</span> (inputTensorDataType)</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  {</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::DataType::Signed32</a>:</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  inputDataContainers.push_back(</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  <a class="code" href="_image_tensor_generator_8hpp.xhtml#ac1e8e68c74e5d1c8fd19a91a68de3cb7">PrepareImageTensor<int></a>(imagePath.string(),</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  inputTensorWidth, inputTensorHeight,</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  normParams,</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  batchSize,</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  inputTensorDataLayout));</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  outputDataContainers = { vector<int>(outputNumElements) };</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a>:</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  inputDataContainers.push_back(</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  <a class="code" href="_image_tensor_generator_8hpp.xhtml#ac372cd2b257f33f29999217e1d2d8a37">PrepareImageTensor<uint8_t></a>(imagePath.string(),</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>  inputTensorWidth, inputTensorHeight,</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  normParams,</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  batchSize,</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  inputTensorDataLayout));</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  outputDataContainers = { vector<uint8_t>(outputNumElements) };</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>  <span class="keywordflow">case</span> <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>:</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  inputDataContainers.push_back(</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  <a class="code" href="_image_tensor_generator_8hpp.xhtml#affacfe95f011fce3b897b2745880f82a">PrepareImageTensor<float></a>(imagePath.string(),</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  inputTensorWidth, inputTensorHeight,</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  normParams,</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>  batchSize,</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  inputTensorDataLayout));</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  outputDataContainers = { vector<float>(outputNumElements) };</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  }</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span> </div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  status = runtime->EnqueueWorkload(networkId,</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <a class="code" href="namespacearmnn_utils.xhtml#ad5310a199d4969927169ed084b1f6c28">armnnUtils::MakeInputTensors</a>(inputBindings, inputDataContainers),</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  <a class="code" href="namespacearmnn_utils.xhtml#ad4efd5a7fa660df5246466d83517220d">armnnUtils::MakeOutputTensors</a>(outputBindings, outputDataContainers));</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span> </div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  <span class="keywordflow">if</span> (status == <a class="code" href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70bae139a585510a502bbf1841cf589f5086">armnn::Status::Failure</a>)</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  {</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(fatal) << <span class="stringliteral">"armnn::IRuntime: Failed to enqueue workload for image: "</span> << imageName;</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  }</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span> </div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  checker.AddImageResult<<a class="code" href="_model_accuracy_checker_test_8cpp.xhtml#a9eb69ebdaf4ceb8014e7c8a540266100">TContainer</a>>(imageName, outputDataContainers);</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  }</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  }</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  {</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>  <span class="keywordflow">return</span> 1;</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> </div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 1; i <= 5; ++i)</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>  {</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>  std::cout << <span class="stringliteral">"Top "</span> << i << <span class="stringliteral">" Accuracy: "</span> << checker.GetAccuracy(i) << <span class="stringliteral">"%"</span> << <span class="stringliteral">"\n"</span>;</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  }</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span> </div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>  <a class="code" href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a>(info) << <span class="stringliteral">"Accuracy Tool ran successfully!"</span>;</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>  }</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keywordflow">catch</span> (<a class="code" href="classarmnn_1_1_exception.xhtml">armnn::Exception</a> <span class="keyword">const</span> & e)</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  {</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <span class="comment">// Coverity fix: BOOST_LOG_TRIVIAL (typically used to report errors) may throw an</span></div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>  <span class="comment">// exception of type std::length_error.</span></div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="comment">// Using stderr instead in this context as there is no point in nesting try-catch blocks here.</span></div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  std::cerr << <span class="stringliteral">"Armnn Error: "</span> << e.<a class="code" href="classarmnn_1_1_exception.xhtml#abf843cbb29dec939d0731e491bab6f70">what</a>() << std::endl;</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>  }</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> std::exception & e)</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>  <span class="comment">// Coverity fix: various boost exceptions can be thrown by methods called by this test.</span></div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  std::cerr << <span class="stringliteral">"WARNING: ModelAccuracyTool-Armnn: An error has occurred when running the "</span></div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  <span class="stringliteral">"Accuracy Tool: "</span> << e.what() << std::endl;</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  <span class="keywordflow">return</span> 1;</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> }</div><div class="ttc" id="classarmnn_1_1_i_runtime_xhtml_ad44ecd3700748dc30dc4bbe34ba5bde7"><div class="ttname"><a href="classarmnn_1_1_i_runtime.xhtml#ad44ecd3700748dc30dc4bbe34ba5bde7">armnn::IRuntime::Create</a></div><div class="ttdeci">static IRuntimePtr Create(const CreationOptions &options)</div><div class="ttdef"><b>Definition:</b> <a href="_runtime_8cpp_source.xhtml#l00032">Runtime.cpp:32</a></div></div> |
| 267 | <div class="ttc" id="namespacearmnn_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">armnn::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00049">Types.hpp:49</a></div></div> |
| 268 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 269 | <div class="ttc" id="namespacearmnn_xhtml_ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64"><div class="ttname"><a href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64">armnn::Compute::CpuRef</a></div><div class="ttdoc">CPU Execution: Reference C++ kernels. </div></div> |
| 270 | <div class="ttc" id="classarmnn_1_1_optional_xhtml"><div class="ttname"><a href="classarmnn_1_1_optional.xhtml">armnn::Optional</a></div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00270">Optional.hpp:270</a></div></div> |
| 271 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_a7599848540a5f43e977119c054b3563ea4df6064eb76f848def300474b7aef0da"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea4df6064eb76f848def300474b7aef0da">SupportedFrontend::Caffe</a></div></div> |
| 272 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 273 | <div class="ttc" id="namespacearmnn_xhtml_aa59f7a819c3e29d10ffc41e5c0616872"><div class="ttname"><a href="namespacearmnn.xhtml#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a></div><div class="ttdeci">void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity)</div><div class="ttdoc">Configures the logging behaviour of the ARMNN library. </div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.xhtml#l00010">Utils.cpp:10</a></div></div> |
| 274 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_a7599848540a5f43e977119c054b3563ea35120628a2097980f88fd49246124cae"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea35120628a2097980f88fd49246124cae">SupportedFrontend::TFLite</a></div></div> |
| 275 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6accedffbc6e5308e33d3843e8bdc0dad7">armnn::DataType::Signed32</a></div></div> |
| 276 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_a7599848540a5f43e977119c054b3563ea074dd699710da0ec1eb45f13b31788e3"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563ea074dd699710da0ec1eb45f13b31788e3">SupportedFrontend::TensorFlow</a></div></div> |
| 277 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_a572494250ece8d94b68ea490d0bf46e4"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#a572494250ece8d94b68ea490d0bf46e4">GetNormalizationParameters</a></div><div class="ttdeci">NormalizationParameters GetNormalizationParameters(const SupportedFrontend &modelFormat, const armnn::DataType &outputType)</div><div class="ttdoc">Get normalization parameters. </div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00039">ImageTensorGenerator.hpp:39</a></div></div> |
| 278 | <div class="ttc" id="namespacearmnn_xhtml_a150468a02bd7b2d2d061c4aaaee939f0"><div class="ttname"><a href="namespacearmnn.xhtml#a150468a02bd7b2d2d061c4aaaee939f0">armnn::IRuntimePtr</a></div><div class="ttdeci">std::unique_ptr< IRuntime, void(*)(IRuntime *runtime)> IRuntimePtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00024">IRuntime.hpp:24</a></div></div> |
| 279 | <div class="ttc" id="class_inference_model_xhtml"><div class="ttname"><a href="class_inference_model.xhtml">InferenceModel</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00316">InferenceModel.hpp:316</a></div></div> |
| 280 | <div class="ttc" id="classarmnn_1_1_exception_xhtml_abf843cbb29dec939d0731e491bab6f70"><div class="ttname"><a href="classarmnn_1_1_exception.xhtml#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.xhtml#l00032">Exceptions.cpp:32</a></div></div> |
| 281 | <div class="ttc" id="_logging_8hpp_xhtml_a7b6ad073975f437ec38ca7d20154727f"><div class="ttname"><a href="_logging_8hpp.xhtml#a7b6ad073975f437ec38ca7d20154727f">ARMNN_LOG</a></div><div class="ttdeci">#define ARMNN_LOG(severity)</div><div class="ttdef"><b>Definition:</b> <a href="_logging_8hpp_source.xhtml#l00163">Logging.hpp:163</a></div></div> |
| 282 | <div class="ttc" id="namespacearmnn_xhtml_ac2807505b850738bc8a1991ce669dd47"><div class="ttname"><a href="namespacearmnn.xhtml#ac2807505b850738bc8a1991ce669dd47">armnn::BackendRegistryInstance</a></div><div class="ttdeci">BackendRegistry & BackendRegistryInstance()</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00013">BackendRegistry.cpp:13</a></div></div> |
| 283 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_ac372cd2b257f33f29999217e1d2d8a37"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#ac372cd2b257f33f29999217e1d2d8a37">PrepareImageTensor< uint8_t ></a></div><div class="ttdeci">std::vector< uint8_t > PrepareImageTensor< uint8_t >(const std::string &imagePath, unsigned int newWidth, unsigned int newHeight, const NormalizationParameters &normParams, unsigned int batchSize, const armnn::DataLayout &outputLayout)</div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00148">ImageTensorGenerator.hpp:148</a></div></div> |
| 284 | <div class="ttc" id="namespace_inference_model_internal_xhtml_a9084adbf804022c874039ad40d1939e9"><div class="ttname"><a href="namespace_inference_model_internal.xhtml#a9084adbf804022c874039ad40d1939e9">InferenceModelInternal::BindingPointInfo</a></div><div class="ttdeci">armnn::BindingPointInfo BindingPointInfo</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00078">InferenceModel.hpp:78</a></div></div> |
| 285 | <div class="ttc" id="namespacearmnn_xhtml_a83015160d8c67d5d77735eb0d4033d9a"><div class="ttname"><a href="namespacearmnn.xhtml#a83015160d8c67d5d77735eb0d4033d9a">armnn::NetworkId</a></div><div class="ttdeci">int NetworkId</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00019">IRuntime.hpp:19</a></div></div> |
| 286 | <div class="ttc" id="classarmnn_1_1_backend_registry_xhtml_ae1de2f7ca1db17f45f97155e239b8b45"><div class="ttname"><a href="classarmnn_1_1_backend_registry.xhtml#ae1de2f7ca1db17f45f97155e239b8b45">armnn::BackendRegistry::GetBackendIdsAsString</a></div><div class="ttdeci">std::string GetBackendIdsAsString() const</div><div class="ttdef"><b>Definition:</b> <a href="_backend_registry_8cpp_source.xhtml#l00076">BackendRegistry.cpp:76</a></div></div> |
| 287 | <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div> |
| 288 | <div class="ttc" id="_model_accuracy_tool-_armnn_8cpp_xhtml_a6bf14e4292511ab535ca9c3df0870185"><div class="ttname"><a href="_model_accuracy_tool-_armnn_8cpp.xhtml#a6bf14e4292511ab535ca9c3df0870185">LoadValidationImageFilenamesAndLabels</a></div><div class="ttdeci">map< std::string, std::string > LoadValidationImageFilenamesAndLabels(const string &validationLabelPath, const string &imageDirectoryPath, size_t begIndex=0, size_t endIndex=0, const string &blacklistPath="")</div><div class="ttdoc">Load image names and ground-truth labels from the image directory and the ground truth label file...</div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00388">ModelAccuracyTool-Armnn.cpp:388</a></div></div> |
| 289 | <div class="ttc" id="structarmnn_deserializer_1_1_binding_point_info_xhtml"><div class="ttname"><a href="structarmnn_deserializer_1_1_binding_point_info.xhtml">armnnDeserializer::BindingPointInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_deserializer_8hpp_source.xhtml#l00018">IDeserializer.hpp:18</a></div></div> |
| 290 | <div class="ttc" id="_model_accuracy_checker_test_8cpp_xhtml_a9eb69ebdaf4ceb8014e7c8a540266100"><div class="ttname"><a href="_model_accuracy_checker_test_8cpp.xhtml#a9eb69ebdaf4ceb8014e7c8a540266100">TContainer</a></div><div class="ttdeci">boost::variant< std::vector< float >, std::vector< int >, std::vector< unsigned char > > TContainer</div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_test_8cpp_source.xhtml#l00059">ModelAccuracyCheckerTest.cpp:59</a></div></div> |
| 291 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml_aad2ac35d4cb83ee4da9fad5fbcb907e0"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml#aad2ac35d4cb83ee4da9fad5fbcb907e0">InferenceModelInternal::Params::m_InputBindings</a></div><div class="ttdeci">std::vector< std::string > m_InputBindings</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00085">InferenceModel.hpp:85</a></div></div> |
| 292 | <div class="ttc" id="struct_normalization_parameters_xhtml"><div class="ttname"><a href="struct_normalization_parameters.xhtml">NormalizationParameters</a></div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00018">ImageTensorGenerator.hpp:18</a></div></div> |
| 293 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">armnn::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00032">Types.hpp:32</a></div></div> |
| 294 | <div class="ttc" id="namespacearmnn_utils_xhtml_ad5310a199d4969927169ed084b1f6c28"><div class="ttname"><a href="namespacearmnn_utils.xhtml#ad5310a199d4969927169ed084b1f6c28">armnnUtils::MakeInputTensors</a></div><div class="ttdeci">armnn::InputTensors MakeInputTensors(const std::vector< armnn::BindingPointInfo > &inputBindings, const std::vector< TContainer > &inputDataContainers)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_i_o_utils_8hpp_source.xhtml#l00017">TensorIOUtils.hpp:17</a></div></div> |
| 295 | <div class="ttc" id="namespacearmnn_utils_xhtml_a158a68b143d2564fa1ca047646cf4185"><div class="ttname"><a href="namespacearmnn_utils.xhtml#a158a68b143d2564fa1ca047646cf4185">armnnUtils::SplitBy</a></div><div class="ttdeci">std::vector< std::string > SplitBy(const std::string &originalString, const std::string &delimiter, bool includeEmptyToken)</div><div class="ttdoc">Split a string into tokens by a delimiter. </div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_8cpp_source.xhtml#l00041">ModelAccuracyChecker.cpp:41</a></div></div> |
| 296 | <div class="ttc" id="namespacearmnn_xhtml_a82e98ef05fd67036d1195ba17174d685"><div class="ttname"><a href="namespacearmnn.xhtml#a82e98ef05fd67036d1195ba17174d685">armnn::Optimize</a></div><div class="ttdeci">IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptions &options=OptimizerOptions(), Optional< std::vector< std::string > &> messages=EmptyOptional())</div><div class="ttdoc">Create an optimized version of the network. </div><div class="ttdef"><b>Definition:</b> <a href="_network_8cpp_source.xhtml#l00890">Network.cpp:890</a></div></div> |
| 297 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml_abeacb4ed1ca9256ee0e8aea73185a0cc"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml#abeacb4ed1ca9256ee0e8aea73185a0cc">InferenceModelInternal::Params::m_OutputBindings</a></div><div class="ttdeci">std::vector< std::string > m_OutputBindings</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00087">InferenceModel.hpp:87</a></div></div> |
| 298 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml_a2d54e6252c1c9a0e29f7706ba03b2b74"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml#a2d54e6252c1c9a0e29f7706ba03b2b74">InferenceModelInternal::Params::m_ComputeDevices</a></div><div class="ttdeci">std::vector< armnn::BackendId > m_ComputeDevices</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00088">InferenceModel.hpp:88</a></div></div> |
| 299 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_aea909c7327109228ef618d459015def3"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#aea909c7327109228ef618d459015def3">armnn::TensorInfo::GetDataType</a></div><div class="ttdeci">DataType GetDataType() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00095">Tensor.hpp:95</a></div></div> |
| 300 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a></div></div> |
| 301 | <div class="ttc" id="namespacearmnn_xhtml_a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba"><div class="ttname"><a href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3daa603905470e2a5b8c13e96b579ef0dba">armnn::LogSeverity::Debug</a></div></div> |
| 302 | <div class="ttc" id="namespacearmnn_xhtml_a67a0db04d321a74b7e7fcfd3f1a3f70b"><div class="ttname"><a href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70b">armnn::Status</a></div><div class="ttdeci">Status</div><div class="ttdoc">enumeration </div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00026">Types.hpp:26</a></div></div> |
| 303 | <div class="ttc" id="namespacearmnn_xhtml_a674efcf6cbdb9e831d653ff0e821fb38"><div class="ttname"><a href="namespacearmnn.xhtml#a674efcf6cbdb9e831d653ff0e821fb38">armnn::IOptimizedNetworkPtr</a></div><div class="ttdeci">std::unique_ptr< IOptimizedNetwork, void(*)(IOptimizedNetwork *network)> IOptimizedNetworkPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00566">INetwork.hpp:566</a></div></div> |
| 304 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_ac1e8e68c74e5d1c8fd19a91a68de3cb7"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#ac1e8e68c74e5d1c8fd19a91a68de3cb7">PrepareImageTensor< int ></a></div><div class="ttdeci">std::vector< int > PrepareImageTensor< int >(const std::string &imagePath, unsigned int newWidth, unsigned int newHeight, const NormalizationParameters &normParams, unsigned int batchSize, const armnn::DataLayout &outputLayout)</div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00128">ImageTensorGenerator.hpp:128</a></div></div> |
| 305 | <div class="ttc" id="namespacearmnn_utils_xhtml_ad4efd5a7fa660df5246466d83517220d"><div class="ttname"><a href="namespacearmnn_utils.xhtml#ad4efd5a7fa660df5246466d83517220d">armnnUtils::MakeOutputTensors</a></div><div class="ttdeci">armnn::OutputTensors MakeOutputTensors(const std::vector< armnn::BindingPointInfo > &outputBindings, std::vector< TContainer > &outputDataContainers)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_i_o_utils_8hpp_source.xhtml#l00056">TensorIOUtils.hpp:56</a></div></div> |
| 306 | <div class="ttc" id="structarmnn_1_1_i_runtime_1_1_creation_options_xhtml"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.xhtml">armnn::IRuntime::CreationOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.xhtml#l00041">IRuntime.hpp:41</a></div></div> |
| 307 | <div class="ttc" id="classarmnn_utils_1_1_model_accuracy_checker_xhtml"><div class="ttname"><a href="classarmnn_utils_1_1_model_accuracy_checker.xhtml">armnnUtils::ModelAccuracyChecker</a></div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_checker_8hpp_source.xhtml#l00045">ModelAccuracyChecker.hpp:45</a></div></div> |
| 308 | <div class="ttc" id="namespacearmnn_xhtml_a280670a263dc4fd40491f6d0a2737f44"><div class="ttname"><a href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">armnn::BindingPointInfo</a></div><div class="ttdeci">std::pair< armnn::LayerBindingId, armnn::TensorInfo > BindingPointInfo</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00146">Tensor.hpp:146</a></div></div> |
| 309 | <div class="ttc" id="namespacearmnn_xhtml_a67a0db04d321a74b7e7fcfd3f1a3f70bae139a585510a502bbf1841cf589f5086"><div class="ttname"><a href="namespacearmnn.xhtml#a67a0db04d321a74b7e7fcfd3f1a3f70bae139a585510a502bbf1841cf589f5086">armnn::Status::Failure</a></div></div> |
| 310 | <div class="ttc" id="_cl_end_to_end_tests_8cpp_xhtml_ab59caffe2ee6be46c08766c055420f17"><div class="ttname"><a href="_cl_end_to_end_tests_8cpp.xhtml#ab59caffe2ee6be46c08766c055420f17">defaultBackends</a></div><div class="ttdeci">std::vector< armnn::BackendId > defaultBackends</div><div class="ttdef"><b>Definition:</b> <a href="_cl_end_to_end_tests_8cpp_source.xhtml#l00025">ClEndToEndTests.cpp:25</a></div></div> |
| 311 | <div class="ttc" id="structarmnn_deserializer_1_1_binding_point_info_xhtml_aa308d10e76e29f09e44a933a2d091a79"><div class="ttname"><a href="structarmnn_deserializer_1_1_binding_point_info.xhtml#aa308d10e76e29f09e44a933a2d091a79">armnnDeserializer::BindingPointInfo::m_TensorInfo</a></div><div class="ttdeci">armnn::TensorInfo m_TensorInfo</div><div class="ttdef"><b>Definition:</b> <a href="_i_deserializer_8hpp_source.xhtml#l00021">IDeserializer.hpp:21</a></div></div> |
| 312 | <div class="ttc" id="classarmnn_1_1_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_exception.xhtml">armnn::Exception</a></div><div class="ttdoc">Base class for all ArmNN exceptions so that users can filter to just those. </div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00046">Exceptions.hpp:46</a></div></div> |
| 313 | <div class="ttc" id="namespacearmnn_xhtml_ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1"><div class="ttname"><a href="namespacearmnn.xhtml#ae2f04a162585c0a5222a537efd5456aea39f8662ca778258e9c6a14f26fec5ec1">armnn::Compute::CpuAcc</a></div><div class="ttdoc">CPU Execution: NEON: ArmCompute. </div></div> |
| 314 | <div class="ttc" id="namespacearmnn_1_1test_xhtml_a8a678fb3a8864e31aeb77f857ae6fc43"><div class="ttname"><a href="namespacearmnn_1_1test.xhtml#a8a678fb3a8864e31aeb77f857ae6fc43">armnn::test::ValidateDirectory</a></div><div class="ttdeci">bool ValidateDirectory(std::string &dir)</div><div class="ttdef"><b>Definition:</b> <a href="_inference_test_8cpp_source.xhtml#l00092">InferenceTest.cpp:92</a></div></div> |
| 315 | <div class="ttc" id="_model_accuracy_tool-_armnn_8cpp_xhtml_a0860c525c02a295d28f4fe0a0c0747c6"><div class="ttname"><a href="_model_accuracy_tool-_armnn_8cpp.xhtml#a0860c525c02a295d28f4fe0a0c0747c6">LoadModelOutputLabels</a></div><div class="ttdeci">std::vector< armnnUtils::LabelCategoryNames > LoadModelOutputLabels(const std::string &modelOutputLabelsPath)</div><div class="ttdoc">Load model output labels from file. </div><div class="ttdef"><b>Definition:</b> <a href="_model_accuracy_tool-_armnn_8cpp_source.xhtml#l00466">ModelAccuracyTool-Armnn.cpp:466</a></div></div> |
| 316 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml_a4fa312cf0d60fbd3988a7c76ab8e2980"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml#a4fa312cf0d60fbd3988a7c76ab8e2980">InferenceModelInternal::Params::m_ModelPath</a></div><div class="ttdeci">std::string m_ModelPath</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00084">InferenceModel.hpp:84</a></div></div> |
| 317 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 318 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml_a6bf2f586c403977d31c7d32d371918cf"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml#a6bf2f586c403977d31c7d32d371918cf">InferenceModelInternal::Params::m_IsModelBinary</a></div><div class="ttdeci">bool m_IsModelBinary</div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00091">InferenceModel.hpp:91</a></div></div> |
| 319 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_a7599848540a5f43e977119c054b3563e"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#a7599848540a5f43e977119c054b3563e">SupportedFrontend</a></div><div class="ttdeci">SupportedFrontend</div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00025">ImageTensorGenerator.hpp:25</a></div></div> |
| 320 | <div class="ttc" id="namespacearmnn_xhtml_ace74f6f9feb95a964a49d79458232703"><div class="ttname"><a href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a></div><div class="ttdeci">std::unique_ptr< INetwork, void(*)(INetwork *network)> INetworkPtr</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00101">INetwork.hpp:101</a></div></div> |
| 321 | <div class="ttc" id="classarmnn_deserializer_1_1_i_deserializer_xhtml"><div class="ttname"><a href="classarmnn_deserializer_1_1_i_deserializer.xhtml">armnnDeserializer::IDeserializer</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_deserializer_8hpp_source.xhtml#l00027">IDeserializer.hpp:27</a></div></div> |
| 322 | <div class="ttc" id="structarmnn_deserializer_1_1_binding_point_info_xhtml_a663b3104ec65e4e08b5e37fb42942087"><div class="ttname"><a href="structarmnn_deserializer_1_1_binding_point_info.xhtml#a663b3104ec65e4e08b5e37fb42942087">armnnDeserializer::BindingPointInfo::m_BindingId</a></div><div class="ttdeci">armnn::LayerBindingId m_BindingId</div><div class="ttdef"><b>Definition:</b> <a href="_i_deserializer_8hpp_source.xhtml#l00020">IDeserializer.hpp:20</a></div></div> |
| 323 | <div class="ttc" id="namespacearmnn_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f"><div class="ttname"><a href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">armnn::DataLayout::NCHW</a></div></div> |
| 324 | <div class="ttc" id="_file_only_profiling_decorator_tests_8cpp_xhtml_a6560146509197f3e197d8d36f76c1347"><div class="ttname"><a href="_file_only_profiling_decorator_tests_8cpp.xhtml#a6560146509197f3e197d8d36f76c1347">options</a></div><div class="ttdeci">armnn::Runtime::CreationOptions::ExternalProfilingOptions options</div><div class="ttdef"><b>Definition:</b> <a href="_file_only_profiling_decorator_tests_8cpp_source.xhtml#l00045">FileOnlyProfilingDecoratorTests.cpp:45</a></div></div> |
| 325 | <div class="ttc" id="struct_inference_model_internal_1_1_params_xhtml"><div class="ttname"><a href="struct_inference_model_internal_1_1_params.xhtml">InferenceModelInternal::Params</a></div><div class="ttdef"><b>Definition:</b> <a href="_inference_model_8hpp_source.xhtml#l00082">InferenceModel.hpp:82</a></div></div> |
| 326 | <div class="ttc" id="namespacearmnn_xhtml_a93a3ba385cad27c4774e5fe64c025d3d"><div class="ttname"><a href="namespacearmnn.xhtml#a93a3ba385cad27c4774e5fe64c025d3d">armnn::LogSeverity</a></div><div class="ttdeci">LogSeverity</div><div class="ttdef"><b>Definition:</b> <a href="_utils_8hpp_source.xhtml#l00012">Utils.hpp:12</a></div></div> |
| 327 | <div class="ttc" id="_image_tensor_generator_8hpp_xhtml_affacfe95f011fce3b897b2745880f82a"><div class="ttname"><a href="_image_tensor_generator_8hpp.xhtml#affacfe95f011fce3b897b2745880f82a">PrepareImageTensor< float ></a></div><div class="ttdeci">std::vector< float > PrepareImageTensor< float >(const std::string &imagePath, unsigned int newWidth, unsigned int newHeight, const NormalizationParameters &normParams, unsigned int batchSize, const armnn::DataLayout &outputLayout)</div><div class="ttdef"><b>Definition:</b> <a href="_image_tensor_generator_8hpp_source.xhtml#l00091">ImageTensorGenerator.hpp:91</a></div></div> |
| 328 | <div class="ttc" id="namespacearmnn_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51"><div class="ttname"><a href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::DataLayout::NHWC</a></div></div> |
| 329 | </div><!-- fragment --> |
| 330 | </div> |
| 331 | </div> |
| 332 | </div><!-- contents --> |
| 333 | </div><!-- doc-content --> |
| 334 | <!-- start footer part --> |
| 335 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 336 | <ul> |
| 337 | <li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_6ace9d3935bcb28cfb421db2ada147b2.xhtml">ModelAccuracyTool-Armnn</a></li><li class="navelem"><a class="el" href="_model_accuracy_tool-_armnn_8cpp.xhtml">ModelAccuracyTool-Armnn.cpp</a></li> |
| 338 | <li class="footer">Generated on Fri Mar 13 2020 16:09:16 for ArmNN by |
| 339 | <a href="http://www.doxygen.org/index.html"> |
| 340 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 341 | </ul> |
| 342 | </div> |
| 343 | </body> |
| 344 | </html> |