Nikhil Raj | 38b600d | 2024-02-15 15:02:19 +0000 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.17--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 7 | <meta name="generator" content="Doxygen 1.8.17"/> |
| 8 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 9 | <title>Arm NN: SimpleSample.cpp</title> |
| 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
| 15 | <script type="text/javascript" src="navtreedata.js"></script> |
| 16 | <script type="text/javascript" src="navtree.js"></script> |
| 17 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 18 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 19 | <script type="text/javascript" src="search/search.js"></script> |
| 20 | <script type="text/x-mathjax-config"> |
| 21 | MathJax.Hub.Config({ |
| 22 | extensions: ["tex2jax.js"], |
| 23 | jax: ["input/TeX","output/HTML-CSS"], |
| 24 | }); |
| 25 | </script> |
| 26 | <script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 27 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 28 | <link href="customdoxygen.css" rel="stylesheet" type="text/css"/> |
| 29 | </head> |
| 30 | <body> |
| 31 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 32 | <div id="titlearea"> |
| 33 | <table cellspacing="0" cellpadding="0"> |
| 34 | <tbody> |
| 35 | <tr style="height: 56px;"> |
| 36 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 15rem; margin-top: .5rem; margin-left 13px"/> |
| 37 | <td id="projectalign" style="padding-left: 0.9em;"> |
| 38 | <div id="projectname"> |
| 39 |  <span id="projectnumber">24.02</span> |
| 40 | </div> |
| 41 | </td> |
| 42 | </tr> |
| 43 | </tbody> |
| 44 | </table> |
| 45 | </div> |
| 46 | <!-- end header part --> |
| 47 | <!-- Generated by Doxygen 1.8.17 --> |
| 48 | <script type="text/javascript"> |
| 49 | /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| 50 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 51 | /* @license-end */ |
| 52 | </script> |
| 53 | <script type="text/javascript" src="menudata.js"></script> |
| 54 | <script type="text/javascript" src="menu.js"></script> |
| 55 | <script type="text/javascript"> |
| 56 | /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| 57 | $(function() { |
| 58 | initMenu('',true,false,'search.php','Search'); |
| 59 | $(document).ready(function() { init_search(); }); |
| 60 | }); |
| 61 | /* @license-end */</script> |
| 62 | <div id="main-nav"></div> |
| 63 | </div><!-- top --> |
| 64 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 65 | <div id="nav-tree"> |
| 66 | <div id="nav-tree-contents"> |
| 67 | <div id="nav-sync" class="sync"></div> |
| 68 | </div> |
| 69 | </div> |
| 70 | <div id="splitbar" style="-moz-user-select:none;" |
| 71 | class="ui-resizable-handle"> |
| 72 | </div> |
| 73 | </div> |
| 74 | <script type="text/javascript"> |
| 75 | /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| 76 | $(document).ready(function(){initNavTree('_simple_sample_8cpp-example.html',''); initResizable(); }); |
| 77 | /* @license-end */ |
| 78 | </script> |
| 79 | <div id="doc-content"> |
| 80 | <!-- window showing the filter options --> |
| 81 | <div id="MSearchSelectWindow" |
| 82 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 83 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 84 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 85 | </div> |
| 86 | |
| 87 | <!-- iframe showing the search results (closed by default) --> |
| 88 | <div id="MSearchResultsWindow"> |
| 89 | <iframe src="javascript:void(0)" frameborder="0" |
| 90 | name="MSearchResults" id="MSearchResults"> |
| 91 | </iframe> |
| 92 | </div> |
| 93 | |
| 94 | <div class="header"> |
| 95 | <div class="headertitle"> |
| 96 | <div class="title">SimpleSample.cpp</div> </div> |
| 97 | </div><!--header--> |
| 98 | <div class="contents"> |
| 99 | <p>This is a very simple example which uses the Arm NN SDK API to create a neural network which consists of nothing else but a single fully connected layer with a single weights value. It's as minimalistic as it can get.</p> |
| 100 | <dl class="section note"><dt>Note</dt><dd>Most of our users won't use our API to create a network manually. Usually you would use one of our software tools like the <a class="el" href="parsers.html#S6_tf_lite_parser">TfLite Parser</a> that will translate a TfLite model into Arm NN for you. Still it's a very nice example to see how an Arm NN network is created, optimized and executed.</dd></dl> |
| 101 | <p>(You can find more complex examples using the TfLite Parser in samples/ObjectDetection and samples/SpeechRecognition. And another example using <a class="el" href="md_python_pyarmnn__r_e_a_d_m_e.html">PyArmnn</a> in samples/ImageClassification)</p> |
| 102 | <div class="fragment"><div class="line"><span class="comment">//</span></div> |
| 103 | <div class="line"><span class="comment">// Copyright © 2017 Arm Ltd. All rights reserved.</span></div> |
| 104 | <div class="line"><span class="comment">// SPDX-License-Identifier: MIT</span></div> |
| 105 | <div class="line"><span class="comment">//</span></div> |
| 106 | <div class="line"><span class="preprocessor">#include <<a class="code" href="_i_network_8hpp.html">armnn/INetwork.hpp</a>></span></div> |
| 107 | <div class="line"><span class="preprocessor">#include <<a class="code" href="_i_runtime_8hpp.html">armnn/IRuntime.hpp</a>></span></div> |
| 108 | <div class="line"><span class="preprocessor">#include <<a class="code" href="_utils_8hpp.html">armnn/Utils.hpp</a>></span></div> |
| 109 | <div class="line"><span class="preprocessor">#include <<a class="code" href="_descriptors_8hpp.html">armnn/Descriptors.hpp</a>></span></div> |
| 110 | <div class="line"> </div> |
| 111 | <div class="line"><span class="preprocessor">#include <iostream></span></div> |
| 112 | <div class="line"><span class="comment"></span> </div> |
| 113 | <div class="line"><span class="comment">/// A simple example of using the ArmNN SDK API. In this sample, the users single input number is multiplied by 1.0f</span></div> |
| 114 | <div class="line"><span class="comment">/// using a fully connected layer with a single neuron to produce an output number that is the same as the input.</span></div> |
| 115 | <div class="line"><span class="comment"></span><span class="keywordtype">int</span> <a name="a0"></a><a class="code" href="_armnn_converter_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a>()</div> |
| 116 | <div class="line">{</div> |
| 117 | <div class="line"> <span class="keyword">using namespace </span><a class="code" href="namespacearmnn.html">armnn</a>;</div> |
| 118 | <div class="line"> </div> |
| 119 | <div class="line"> <span class="keywordtype">float</span> number;</div> |
| 120 | <div class="line"> std::cout << <span class="stringliteral">"Please enter a number: "</span> << std::endl;</div> |
| 121 | <div class="line"> std::cin >> number;</div> |
| 122 | <div class="line"> </div> |
| 123 | <div class="line"> <span class="comment">// Turn on logging to standard output</span></div> |
| 124 | <div class="line"> <span class="comment">// This is useful in this sample so that users can learn more about what is going on</span></div> |
| 125 | <div class="line"> <a name="a1"></a><a class="code" href="namespacearmnn.html#aa59f7a819c3e29d10ffc41e5c0616872">ConfigureLogging</a>(<span class="keyword">true</span>, <span class="keyword">false</span>, <a name="a2"></a><a class="code" href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3da0eaadb4fcb48a0a0ed7bc9868be9fbaa">LogSeverity::Warning</a>);</div> |
| 126 | <div class="line"> </div> |
| 127 | <div class="line"> <span class="comment">// Construct ArmNN network</span></div> |
| 128 | <div class="line"> <a class="code" href="namespacearmnn.html#a0d8160388a127c1a23b37bc88dc6e2ec">NetworkId</a> networkIdentifier;</div> |
| 129 | <div class="line"> <a class="code" href="namespacearmnn.html#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> myNetwork = <a name="a3"></a><a class="code" href="classarmnn_1_1_i_network.html#a41ce159095e95f7cd4174ce5d4662697">INetwork::Create</a>();</div> |
| 130 | <div class="line"> </div> |
| 131 | <div class="line"> <span class="keywordtype">float</span> weightsData[] = {1.0f}; <span class="comment">// Identity</span></div> |
| 132 | <div class="line"> <a name="_a4"></a><a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> weightsInfo(<a name="_a5"></a><a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>({1, 1}), <a name="a6"></a><a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>, 0.0f, 0, <span class="keyword">true</span>);</div> |
| 133 | <div class="line"> weightsInfo.<a name="a7"></a><a class="code" href="classarmnn_1_1_tensor_info.html#a8ffca1e21bdfa7f945617acd606aac91">SetConstant</a>();</div> |
| 134 | <div class="line"> <a name="_a8"></a><a class="code" href="classarmnn_1_1_const_tensor.html">ConstTensor</a> weights(weightsInfo, weightsData);</div> |
| 135 | <div class="line"> </div> |
| 136 | <div class="line"> <span class="comment">// Constant layer that now holds weights data for FullyConnected</span></div> |
| 137 | <div class="line"> <a name="_a9"></a><a class="code" href="classarmnn_1_1_i_connectable_layer.html">IConnectableLayer</a>* <span class="keyword">const</span> constantWeightsLayer = myNetwork->AddConstantLayer(weights, <span class="stringliteral">"const weights"</span>);</div> |
| 138 | <div class="line"> </div> |
| 139 | <div class="line"> <a name="_a10"></a><a class="code" href="structarmnn_1_1_fully_connected_descriptor.html">FullyConnectedDescriptor</a> fullyConnectedDesc;</div> |
| 140 | <div class="line"> <a class="code" href="classarmnn_1_1_i_connectable_layer.html">IConnectableLayer</a>* <span class="keyword">const</span> fullyConnectedLayer = myNetwork->AddFullyConnectedLayer(fullyConnectedDesc,</div> |
| 141 | <div class="line"> <span class="stringliteral">"fully connected"</span>);</div> |
| 142 | <div class="line"> <a class="code" href="classarmnn_1_1_i_connectable_layer.html">IConnectableLayer</a>* <a name="_a11"></a><a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a> = myNetwork->AddInputLayer(0);</div> |
| 143 | <div class="line"> <a class="code" href="classarmnn_1_1_i_connectable_layer.html">IConnectableLayer</a>* <a name="_a12"></a><a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a> = myNetwork->AddOutputLayer(0);</div> |
| 144 | <div class="line"> </div> |
| 145 | <div class="line"> <a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>-><a name="a13"></a><a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a name="a14"></a><a class="code" href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">Connect</a>(fullyConnectedLayer-><a name="a15"></a><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div> |
| 146 | <div class="line"> constantWeightsLayer-><a name="a16"></a><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a name="a17"></a><a class="code" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(1));</div> |
| 147 | <div class="line"> fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(<a class="code" href="classarmnn_1_1_output_layer.html">OutputLayer</a>-><a name="a18"></a><a class="code" href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">GetInputSlot</a>(0));</div> |
| 148 | <div class="line"> </div> |
| 149 | <div class="line"> <span class="comment">// Create ArmNN runtime</span></div> |
| 150 | <div class="line"> <a name="_a19"></a><a class="code" href="structarmnn_1_1_i_runtime_1_1_creation_options.html">IRuntime::CreationOptions</a> options; <span class="comment">// default options</span></div> |
| 151 | <div class="line"> <a class="code" href="namespacearmnn.html#a150468a02bd7b2d2d061c4aaaee939f0">IRuntimePtr</a> run = <a name="a20"></a><a class="code" href="classarmnn_1_1_i_runtime.html#ad44ecd3700748dc30dc4bbe34ba5bde7">IRuntime::Create</a>(options);</div> |
| 152 | <div class="line"> </div> |
| 153 | <div class="line"> <span class="comment">//Set the tensors in the network.</span></div> |
| 154 | <div class="line"> <a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> inputTensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>({1, 1}), <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>);</div> |
| 155 | <div class="line"> <a class="code" href="classarmnn_1_1_input_layer.html">InputLayer</a>-><a class="code" href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">GetOutputSlot</a>(0).<a name="a21"></a><a class="code" href="classarmnn_1_1_output_slot.html#a7e5c5771d741dd5473989047a9314728">SetTensorInfo</a>(inputTensorInfo);</div> |
| 156 | <div class="line"> </div> |
| 157 | <div class="line"> <a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> outputTensorInfo(<a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>({1, 1}), <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>);</div> |
| 158 | <div class="line"> fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a name="a22"></a><a class="code" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(outputTensorInfo);</div> |
| 159 | <div class="line"> constantWeightsLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(weightsInfo);</div> |
| 160 | <div class="line"> </div> |
| 161 | <div class="line"> <span class="comment">// Optimise ArmNN network</span></div> |
| 162 | <div class="line"> <a class="code" href="namespacearmnn.html#a674efcf6cbdb9e831d653ff0e821fb38">IOptimizedNetworkPtr</a> optNet = <a name="a23"></a><a class="code" href="namespacearmnn.html#aa42e128b41f4e966fc901f9bf42c5a1c">Optimize</a>(*myNetwork, {<a name="a24"></a><a class="code" href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64">Compute::CpuRef</a>}, run->GetDeviceSpec());</div> |
| 163 | <div class="line"> <span class="keywordflow">if</span> (!optNet)</div> |
| 164 | <div class="line"> {</div> |
| 165 | <div class="line"> <span class="comment">// This shouldn't happen for this simple sample, with reference backend.</span></div> |
| 166 | <div class="line"> <span class="comment">// But in general usage Optimize could fail if the hardware at runtime cannot</span></div> |
| 167 | <div class="line"> <span class="comment">// support the model that has been provided.</span></div> |
| 168 | <div class="line"> std::cerr << <span class="stringliteral">"Error: Failed to optimise the input network."</span> << std::endl;</div> |
| 169 | <div class="line"> <span class="keywordflow">return</span> 1;</div> |
| 170 | <div class="line"> }</div> |
| 171 | <div class="line"> </div> |
| 172 | <div class="line"> <span class="comment">// Load graph into runtime</span></div> |
| 173 | <div class="line"> run->LoadNetwork(networkIdentifier, std::move(optNet));</div> |
| 174 | <div class="line"> </div> |
| 175 | <div class="line"> <span class="comment">//Creates structures for inputs and outputs.</span></div> |
| 176 | <div class="line"> std::vector<float> inputData{number};</div> |
| 177 | <div class="line"> std::vector<float> outputData(1);</div> |
| 178 | <div class="line"> </div> |
| 179 | <div class="line"> inputTensorInfo = run->GetInputTensorInfo(networkIdentifier, 0);</div> |
| 180 | <div class="line"> inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a8ffca1e21bdfa7f945617acd606aac91">SetConstant</a>(<span class="keyword">true</span>);</div> |
| 181 | <div class="line"> <a class="code" href="namespacearmnn.html#aa01bce88f89975a5a031db4cc8861527">InputTensors</a> inputTensors{{0, <a class="code" href="classarmnn_1_1_const_tensor.html">armnn::ConstTensor</a>(inputTensorInfo,</div> |
| 182 | <div class="line"> inputData.data())}};</div> |
| 183 | <div class="line"> <a class="code" href="namespacearmnn.html#a8f091a512915d1cb29a4ebf13dfc53ea">OutputTensors</a> outputTensors{{0, <a name="_a25"></a><a class="code" href="classarmnn_1_1_tensor.html">armnn::Tensor</a>(run->GetOutputTensorInfo(networkIdentifier, 0),</div> |
| 184 | <div class="line"> outputData.data())}};</div> |
| 185 | <div class="line"> </div> |
| 186 | <div class="line"> <span class="comment">// Execute network</span></div> |
| 187 | <div class="line"> run->EnqueueWorkload(networkIdentifier, inputTensors, outputTensors);</div> |
| 188 | <div class="line"> </div> |
| 189 | <div class="line"> std::cout << <span class="stringliteral">"Your number was "</span> << outputData[0] << std::endl;</div> |
| 190 | <div class="line"> <span class="keywordflow">return</span> 0;</div> |
| 191 | <div class="line"> </div> |
| 192 | <div class="line">}</div> |
| 193 | </div><!-- fragment --> </div><!-- contents --> |
| 194 | </div><!-- doc-content --> |
| 195 | <div class="ttc" id="aclassarmnn_1_1_input_layer_html"><div class="ttname"><a href="classarmnn_1_1_input_layer.html">armnn::InputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs).</div><div class="ttdef"><b>Definition:</b> <a href="_input_layer_8hpp_source.html#l00013">InputLayer.hpp:13</a></div></div> |
| 196 | <div class="ttc" id="anamespacearmnn_html_ace74f6f9feb95a964a49d79458232703"><div class="ttname"><a href="namespacearmnn.html#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.html#l00339">INetwork.hpp:339</a></div></div> |
| 197 | <div class="ttc" id="anamespacearmnn_html_a674efcf6cbdb9e831d653ff0e821fb38"><div class="ttname"><a href="namespacearmnn.html#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.html#l00340">INetwork.hpp:340</a></div></div> |
| 198 | <div class="ttc" id="aclassarmnn_1_1_tensor_html"><div class="ttname"><a href="classarmnn_1_1_tensor.html">armnn::Tensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and a mutable backing store.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00321">Tensor.hpp:321</a></div></div> |
| 199 | <div class="ttc" id="a_i_runtime_8hpp_html"><div class="ttname"><a href="_i_runtime_8hpp.html">IRuntime.hpp</a></div></div> |
| 200 | <div class="ttc" id="astructarmnn_1_1_fully_connected_descriptor_html"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.html">armnn::FullyConnectedDescriptor</a></div><div class="ttdoc">A FullyConnectedDescriptor for the FullyConnectedLayer.</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.html#l00507">Descriptors.hpp:507</a></div></div> |
| 201 | <div class="ttc" id="a_descriptors_8hpp_html"><div class="ttname"><a href="_descriptors_8hpp.html">Descriptors.hpp</a></div></div> |
| 202 | <div class="ttc" id="anamespacearmnn_html_aa01bce88f89975a5a031db4cc8861527"><div class="ttname"><a href="namespacearmnn.html#aa01bce88f89975a5a031db4cc8861527">armnn::InputTensors</a></div><div class="ttdeci">std::vector< std::pair< LayerBindingId, class ConstTensor > > InputTensors</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00394">Tensor.hpp:394</a></div></div> |
| 203 | <div class="ttc" id="anamespacearmnn_html_ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64"><div class="ttname"><a href="namespacearmnn.html#ae2f04a162585c0a5222a537efd5456aea83c2c4e9b658ccafbcbe6309c5d84c64">armnn::Compute::CpuRef</a></div><div class="ttdeci">@ CpuRef</div><div class="ttdoc">CPU Execution: Reference C++ kernels.</div></div> |
| 204 | <div class="ttc" id="aclassarmnn_1_1_output_slot_html_a7e5c5771d741dd5473989047a9314728"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#a7e5c5771d741dd5473989047a9314728">armnn::OutputSlot::SetTensorInfo</a></div><div class="ttdeci">void SetTensorInfo(const TensorInfo &tensorInfo) override</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00087">Layer.cpp:87</a></div></div> |
| 205 | <div class="ttc" id="aclassarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00152">Tensor.hpp:152</a></div></div> |
| 206 | <div class="ttc" id="anamespacearmnn_html_aa59f7a819c3e29d10ffc41e5c0616872"><div class="ttname"><a href="namespacearmnn.html#aa59f7a819c3e29d10ffc41e5c0616872">armnn::ConfigureLogging</a></div><div class="ttdeci">void ConfigureLogging(bool printToStandardOutput, bool printToDebugOutput, LogSeverity severity)</div><div class="ttdoc">Configures the logging behaviour of the ARMNN library.</div><div class="ttdef"><b>Definition:</b> <a href="_utils_8cpp_source.html#l00018">Utils.cpp:18</a></div></div> |
| 207 | <div class="ttc" id="anamespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div><div class="ttdeci">@ Float32</div></div> |
| 208 | <div class="ttc" id="aclassarmnn_1_1_layer_html_a0e36688a43c35668d8db5257274c68fe"><div class="ttname"><a href="classarmnn_1_1_layer.html#a0e36688a43c35668d8db5257274c68fe">armnn::Layer::GetOutputSlot</a></div><div class="ttdeci">const OutputSlot & GetOutputSlot(unsigned int index=0) const override</div><div class="ttdoc">Get the const output slot handle by slot index.</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00339">Layer.hpp:339</a></div></div> |
| 209 | <div class="ttc" id="anamespacearmnn_html_a8f091a512915d1cb29a4ebf13dfc53ea"><div class="ttname"><a href="namespacearmnn.html#a8f091a512915d1cb29a4ebf13dfc53ea">armnn::OutputTensors</a></div><div class="ttdeci">std::vector< std::pair< LayerBindingId, class Tensor > > OutputTensors</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00395">Tensor.hpp:395</a></div></div> |
| 210 | <div class="ttc" id="aclassarmnn_1_1_output_slot_html_adcfb97035799ea4c043f9ef370714815"><div class="ttname"><a href="classarmnn_1_1_output_slot.html#adcfb97035799ea4c043f9ef370714815">armnn::OutputSlot::Connect</a></div><div class="ttdeci">int Connect(InputSlot &destination)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8cpp_source.html#l00112">Layer.cpp:112</a></div></div> |
| 211 | <div class="ttc" id="aclassarmnn_1_1_layer_html_acf8b8e23bf647836592982f97088d375"><div class="ttname"><a href="classarmnn_1_1_layer.html#acf8b8e23bf647836592982f97088d375">armnn::Layer::GetInputSlot</a></div><div class="ttdeci">const InputSlot & GetInputSlot(unsigned int index) const override</div><div class="ttdoc">Get a const input slot handle by slot index.</div><div class="ttdef"><b>Definition:</b> <a href="_layer_8hpp_source.html#l00337">Layer.hpp:337</a></div></div> |
| 212 | <div class="ttc" id="aclassarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div> |
| 213 | <div class="ttc" id="anamespacearmnn_html_a0d8160388a127c1a23b37bc88dc6e2ec"><div class="ttname"><a href="namespacearmnn.html#a0d8160388a127c1a23b37bc88dc6e2ec">armnn::NetworkId</a></div><div class="ttdeci">int NetworkId</div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.html#l00035">IRuntime.hpp:35</a></div></div> |
| 214 | <div class="ttc" id="a_i_network_8hpp_html"><div class="ttname"><a href="_i_network_8hpp.html">INetwork.hpp</a></div></div> |
| 215 | <div class="ttc" id="anamespacearmnn_html_a150468a02bd7b2d2d061c4aaaee939f0"><div class="ttname"><a href="namespacearmnn.html#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.html#l00041">IRuntime.hpp:41</a></div></div> |
| 216 | <div class="ttc" id="aclassarmnn_1_1_i_output_slot_html_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 217 | <div class="ttc" id="a_utils_8hpp_html"><div class="ttname"><a href="_utils_8hpp.html">Utils.hpp</a></div></div> |
| 218 | <div class="ttc" id="aclassarmnn_1_1_output_layer_html"><div class="ttname"><a href="classarmnn_1_1_output_layer.html">armnn::OutputLayer</a></div><div class="ttdoc">A layer user-provided data can be bound to (e.g. inputs, outputs).</div><div class="ttdef"><b>Definition:</b> <a href="_output_layer_8hpp_source.html#l00013">OutputLayer.hpp:13</a></div></div> |
| 219 | <div class="ttc" id="a_armnn_converter_8cpp_html_a0ddf1224851353fc92bfbff6f499fa97"><div class="ttname"><a href="_armnn_converter_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a></div><div class="ttdeci">int main(int argc, char *argv[])</div><div class="ttdef"><b>Definition:</b> <a href="_armnn_converter_8cpp_source.html#l00327">ArmnnConverter.cpp:327</a></div></div> |
| 220 | <div class="ttc" id="aclassarmnn_1_1_i_output_slot_html_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 221 | <div class="ttc" id="astructarmnn_1_1_i_runtime_1_1_creation_options_html"><div class="ttname"><a href="structarmnn_1_1_i_runtime_1_1_creation_options.html">armnn::IRuntime::CreationOptions</a></div><div class="ttdef"><b>Definition:</b> <a href="_i_runtime_8hpp_source.html#l00078">IRuntime.hpp:78</a></div></div> |
| 222 | <div class="ttc" id="aclassarmnn_1_1_i_runtime_html_ad44ecd3700748dc30dc4bbe34ba5bde7"><div class="ttname"><a href="classarmnn_1_1_i_runtime.html#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.html#l00052">Runtime.cpp:52</a></div></div> |
| 223 | <div class="ttc" id="anamespacearmnn_html_a93a3ba385cad27c4774e5fe64c025d3da0eaadb4fcb48a0a0ed7bc9868be9fbaa"><div class="ttname"><a href="namespacearmnn.html#a93a3ba385cad27c4774e5fe64c025d3da0eaadb4fcb48a0a0ed7bc9868be9fbaa">armnn::LogSeverity::Warning</a></div><div class="ttdeci">@ Warning</div></div> |
| 224 | <div class="ttc" id="aclassarmnn_1_1_i_connectable_layer_html_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index.</div></div> |
| 225 | <div class="ttc" id="anamespacearmnn_html"><div class="ttname"><a href="namespacearmnn.html">armnn</a></div><div class="ttdoc">Copyright (c) 2021 ARM Limited and Contributors.</div><div class="ttdef"><b>Definition:</b> <a href="01__00__quick__start_8dox_source.html#l00006">01_00_quick_start.dox:6</a></div></div> |
| 226 | <div class="ttc" id="aclassarmnn_1_1_i_connectable_layer_html_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index.</div></div> |
| 227 | <div class="ttc" id="aclassarmnn_1_1_const_tensor_html"><div class="ttname"><a href="classarmnn_1_1_const_tensor.html">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00329">Tensor.hpp:329</a></div></div> |
| 228 | <div class="ttc" id="aclassarmnn_1_1_i_connectable_layer_html"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.html">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.</div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.html#l00080">INetwork.hpp:80</a></div></div> |
| 229 | <div class="ttc" id="aclassarmnn_1_1_tensor_info_html_a8ffca1e21bdfa7f945617acd606aac91"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a8ffca1e21bdfa7f945617acd606aac91">armnn::TensorInfo::SetConstant</a></div><div class="ttdeci">void SetConstant(const bool IsConstant=true)</div><div class="ttdoc">Marks the data corresponding to this tensor info as constant.</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.html#l00514">Tensor.cpp:514</a></div></div> |
| 230 | <div class="ttc" id="anamespacearmnn_html_aa42e128b41f4e966fc901f9bf42c5a1c"><div class="ttname"><a href="namespacearmnn.html#aa42e128b41f4e966fc901f9bf42c5a1c">armnn::Optimize</a></div><div class="ttdeci">IOptimizedNetworkPtr Optimize(const INetwork &network, const std::vector< BackendId > &backendPreferences, const IDeviceSpec &deviceSpec, const OptimizerOptionsOpaque &options=OptimizerOptionsOpaque(), 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.html#l02132">Network.cpp:2132</a></div></div> |
| 231 | <div class="ttc" id="aclassarmnn_1_1_i_network_html_a41ce159095e95f7cd4174ce5d4662697"><div class="ttname"><a href="classarmnn_1_1_i_network.html#a41ce159095e95f7cd4174ce5d4662697">armnn::INetwork::Create</a></div><div class="ttdeci">static INetworkPtr Create(const NetworkOptions &networkOptions={})</div><div class="ttdef"><b>Definition:</b> <a href="_network_8cpp_source.html#l00676">Network.cpp:676</a></div></div> |
| 232 | <!-- start footer part --> |
| 233 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 234 | <ul> |
| 235 | <li class="footer">Generated on Wed Feb 14 2024 16:36:13 for Arm NN by |
| 236 | <a href="http://www.doxygen.org/index.html"> |
| 237 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li> |
| 238 | </ul> |
| 239 | </div> |
| 240 | </body> |
| 241 | </html> |