1 <!-- HTML header for doxygen 1.8.9.1-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
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.11"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: MobileNetNetwork< TensorType, Accessor, ActivationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionLayerFunction, ReshapeFunction, PoolingLayerFunction > Class Template Reference</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 <script type="text/javascript">
18 $(document).ready(initResizable);
19 $(window).load(resizeHeight);
21 <link href="search/search.css" rel="stylesheet" type="text/css"/>
22 <script type="text/javascript" src="search/searchdata.js"></script>
23 <script type="text/javascript" src="search/search.js"></script>
24 <script type="text/javascript">
25 $(document).ready(function() { init_search(); });
27 <script type="text/x-mathjax-config">
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
32 </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
33 <link href="doxygen.css" rel="stylesheet" type="text/css" />
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
42 <div id="projectname">Compute Library
43  <span id="projectnumber">18.05</span>
50 <!-- end header part -->
51 <!-- Generated by Doxygen 1.8.11 -->
52 <script type="text/javascript">
53 var searchBox = new SearchBox("searchBox", "search",false,'Search');
55 <div id="navrow1" class="tabs">
57 <li><a href="index.xhtml"><span>Main Page</span></a></li>
58 <li><a href="pages.xhtml"><span>Related Pages</span></a></li>
59 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li class="current"><a href="annotated.xhtml"><span>Data Structures</span></a></li>
61 <li><a href="files.xhtml"><span>Files</span></a></li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
80 <div id="navrow2" class="tabs2">
82 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
83 <li><a href="classes.xhtml"><span>Data Structure Index</span></a></li>
84 <li><a href="inherits.xhtml"><span>Class Hierarchy</span></a></li>
85 <li><a href="functions.xhtml"><span>Data Fields</span></a></li>
89 <div id="side-nav" class="ui-resizable side-nav-resizable">
91 <div id="nav-tree-contents">
92 <div id="nav-sync" class="sync"></div>
95 <div id="splitbar" style="-moz-user-select:none;"
96 class="ui-resizable-handle">
99 <script type="text/javascript">
100 $(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml','');});
102 <div id="doc-content">
103 <!-- window showing the filter options -->
104 <div id="MSearchSelectWindow"
105 onmouseover="return searchBox.OnSearchSelectShow()"
106 onmouseout="return searchBox.OnSearchSelectHide()"
107 onkeydown="return searchBox.OnSearchSelectKey(event)">
110 <!-- iframe showing the search results (closed by default) -->
111 <div id="MSearchResultsWindow">
112 <iframe src="javascript:void(0)" frameborder="0"
113 name="MSearchResults" id="MSearchResults">
118 <div class="summary">
119 <a href="#pub-methods">Public Member Functions</a> </div>
120 <div class="headertitle">
121 <div class="title">MobileNetNetwork< TensorType, Accessor, ActivationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionLayerFunction, ReshapeFunction, PoolingLayerFunction > Class Template Reference</div> </div>
123 <div class="contents">
125 <p>MobileNet model object.
126 <a href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#details">More...</a></p>
128 <p><code>#include <<a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>></code></p>
129 <table class="memberdecls">
130 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
131 Public Member Functions</h2></td></tr>
132 <tr class="memitem:ae3ad9a7ab50bae85c5020f337adc7869"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#ae3ad9a7ab50bae85c5020f337adc7869">init</a> (int batches)</td></tr>
133 <tr class="memdesc:ae3ad9a7ab50bae85c5020f337adc7869"><td class="mdescLeft"> </td><td class="mdescRight">Initialize the network. <a href="#ae3ad9a7ab50bae85c5020f337adc7869">More...</a><br /></td></tr>
134 <tr class="separator:ae3ad9a7ab50bae85c5020f337adc7869"><td class="memSeparator" colspan="2"> </td></tr>
135 <tr class="memitem:a7740c7ab195c03ac140f1f75f633470f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#a7740c7ab195c03ac140f1f75f633470f">build</a> ()</td></tr>
136 <tr class="memdesc:a7740c7ab195c03ac140f1f75f633470f"><td class="mdescLeft"> </td><td class="mdescRight">Build the model. <a href="#a7740c7ab195c03ac140f1f75f633470f">More...</a><br /></td></tr>
137 <tr class="separator:a7740c7ab195c03ac140f1f75f633470f"><td class="memSeparator" colspan="2"> </td></tr>
138 <tr class="memitem:acaefe811b78a2fdc4a0dba0c4029c3ef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#acaefe811b78a2fdc4a0dba0c4029c3ef">allocate</a> ()</td></tr>
139 <tr class="memdesc:acaefe811b78a2fdc4a0dba0c4029c3ef"><td class="mdescLeft"> </td><td class="mdescRight">Allocate the network. <a href="#acaefe811b78a2fdc4a0dba0c4029c3ef">More...</a><br /></td></tr>
140 <tr class="separator:acaefe811b78a2fdc4a0dba0c4029c3ef"><td class="memSeparator" colspan="2"> </td></tr>
141 <tr class="memitem:a3b778cda9ac3fad08e7217edbcb942e0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#a3b778cda9ac3fad08e7217edbcb942e0">fill_random</a> ()</td></tr>
142 <tr class="memdesc:a3b778cda9ac3fad08e7217edbcb942e0"><td class="mdescLeft"> </td><td class="mdescRight">Fills the trainable parameters and input with random data. <a href="#a3b778cda9ac3fad08e7217edbcb942e0">More...</a><br /></td></tr>
143 <tr class="separator:a3b778cda9ac3fad08e7217edbcb942e0"><td class="memSeparator" colspan="2"> </td></tr>
144 <tr class="memitem:a3a41262ce9aed70a248ecefae646013b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#a3a41262ce9aed70a248ecefae646013b">feed</a> (std::string name)</td></tr>
145 <tr class="memdesc:a3a41262ce9aed70a248ecefae646013b"><td class="mdescLeft"> </td><td class="mdescRight">Feed input to network from file. <a href="#a3a41262ce9aed70a248ecefae646013b">More...</a><br /></td></tr>
146 <tr class="separator:a3a41262ce9aed70a248ecefae646013b"><td class="memSeparator" colspan="2"> </td></tr>
147 <tr class="memitem:a1466ef70729f3c8b5da5ebfec3f53f26"><td class="memItemLeft" align="right" valign="top">std::vector< unsigned int > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#a1466ef70729f3c8b5da5ebfec3f53f26">get_classifications</a> ()</td></tr>
148 <tr class="memdesc:a1466ef70729f3c8b5da5ebfec3f53f26"><td class="mdescLeft"> </td><td class="mdescRight">Get the classification results. <a href="#a1466ef70729f3c8b5da5ebfec3f53f26">More...</a><br /></td></tr>
149 <tr class="separator:a1466ef70729f3c8b5da5ebfec3f53f26"><td class="memSeparator" colspan="2"> </td></tr>
150 <tr class="memitem:ac8bb3912a3ce86b15842e79d0b421204"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#ac8bb3912a3ce86b15842e79d0b421204">clear</a> ()</td></tr>
151 <tr class="memdesc:ac8bb3912a3ce86b15842e79d0b421204"><td class="mdescLeft"> </td><td class="mdescRight">Clear all allocated memory from the tensor objects. <a href="#ac8bb3912a3ce86b15842e79d0b421204">More...</a><br /></td></tr>
152 <tr class="separator:ac8bb3912a3ce86b15842e79d0b421204"><td class="memSeparator" colspan="2"> </td></tr>
153 <tr class="memitem:a13a43e6d814de94978c515cb084873b1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#a13a43e6d814de94978c515cb084873b1">run</a> ()</td></tr>
154 <tr class="memdesc:a13a43e6d814de94978c515cb084873b1"><td class="mdescLeft"> </td><td class="mdescRight">Runs the model. <a href="#a13a43e6d814de94978c515cb084873b1">More...</a><br /></td></tr>
155 <tr class="separator:a13a43e6d814de94978c515cb084873b1"><td class="memSeparator" colspan="2"> </td></tr>
156 <tr class="memitem:ad55f80ed3cd8b6c4f247763b747016af"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml#ad55f80ed3cd8b6c4f247763b747016af">sync</a> ()</td></tr>
157 <tr class="memdesc:ad55f80ed3cd8b6c4f247763b747016af"><td class="mdescLeft"> </td><td class="mdescRight">Sync the results. <a href="#ad55f80ed3cd8b6c4f247763b747016af">More...</a><br /></td></tr>
158 <tr class="separator:ad55f80ed3cd8b6c4f247763b747016af"><td class="memSeparator" colspan="2"> </td></tr>
160 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
161 <div class="textblock"><h3>template<typename TensorType, typename Accessor, typename ActivationLayerFunction, typename ConvolutionLayerFunction, typename DirectConvolutionLayerFunction, typename DepthwiseConvolutionLayerFunction, typename ReshapeFunction, typename PoolingLayerFunction><br />
162 class arm_compute::test::networks::MobileNetNetwork< TensorType, Accessor, ActivationLayerFunction, ConvolutionLayerFunction, DirectConvolutionLayerFunction, DepthwiseConvolutionLayerFunction, ReshapeFunction, PoolingLayerFunction ></h3>
164 <p>MobileNet model object. </p>
166 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00053">53</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
167 </div><h2 class="groupheader">Member Function Documentation</h2>
168 <a class="anchor" id="acaefe811b78a2fdc4a0dba0c4029c3ef"></a>
169 <div class="memitem">
170 <div class="memproto">
171 <table class="mlabels">
173 <td class="mlabels-left">
174 <table class="memname">
176 <td class="memname">void allocate </td>
178 <td class="paramname"></td><td>)</td>
183 <td class="mlabels-right">
184 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
187 </div><div class="memdoc">
189 <p>Allocate the network. </p>
191 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00113">113</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
192 <div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  {</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  input.allocator()->allocate();</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  output.allocator()->allocate();</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span> </div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  w_conv3x3.allocator()->allocate();</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  b_conv3x3.allocator()->allocate();</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_conv.size(); ++i)</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>  w_conv[i].allocator()->allocate();</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  b_conv[i].allocator()->allocate();</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_dwc.size(); ++i)</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>  w_dwc[i].allocator()->allocate();</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  b_dwc[i].allocator()->allocate();</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> &o : conv_out)</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  {</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  o.allocator()->allocate();</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  }</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> &o : dwc_out)</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>  o.allocator()->allocate();</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  }</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  pool_out.allocator()->allocate();</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  }</div></div><!-- fragment -->
195 <a class="anchor" id="a7740c7ab195c03ac140f1f75f633470f"></a>
196 <div class="memitem">
197 <div class="memproto">
198 <table class="mlabels">
200 <td class="mlabels-left">
201 <table class="memname">
203 <td class="memname">void build </td>
205 <td class="paramname"></td><td>)</td>
210 <td class="mlabels-right">
211 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
214 </div><div class="memdoc">
216 <p>Build the model. </p>
218 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00088">88</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
220 <p>References <a class="el" href="namespacearm__compute.xhtml#a9172da722f0a434e5cc07c0a3c115d93afcefd647d6a866603c627b11347c707a">arm_compute::AVG</a>, <a class="el" href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaacc516ab03b98f1c908ddf6ed4a7c45e9">ActivationLayerInfo::BOUNDED_RELU</a>, <a class="el" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">arm_compute::FLOOR</a>, and <a class="el" href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaa72ee60fba0509af07cbbd91398d8db9d">ActivationLayerInfo::LOGISTIC</a>.</p>
221 <div class="fragment"><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  {</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="comment">// Configure Layers</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  conv3x3.configure(&input, &w_conv3x3, &b_conv3x3, &conv_out[0], <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 1, 0, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>));</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  conv3x3_act.configure(&conv_out[0], <span class="keyword">nullptr</span>, <a class="code" href="classarm__compute_1_1_activation_layer_info.xhtml">ActivationLayerInfo</a>(<a class="code" href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaacc516ab03b98f1c908ddf6ed4a7c45e9">ActivationLayerInfo::ActivationFunction::BOUNDED_RELU</a>, 6.f));</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  depthwise_conv_block_build(0, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  depthwise_conv_block_build(1, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 1, 0, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  depthwise_conv_block_build(2, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  depthwise_conv_block_build(3, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 1, 0, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  depthwise_conv_block_build(4, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  depthwise_conv_block_build(5, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 1, 0, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  depthwise_conv_block_build(6, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  depthwise_conv_block_build(7, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  depthwise_conv_block_build(8, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  depthwise_conv_block_build(9, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  depthwise_conv_block_build(10, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  depthwise_conv_block_build(11, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 1, 0, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  depthwise_conv_block_build(12, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 1, 1, 1, 1, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">DimensionRoundingType::FLOOR</a>), <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  pool.configure(&conv_out[13], &pool_out, <a class="code" href="classarm__compute_1_1_pooling_layer_info.xhtml">PoolingLayerInfo</a>(<a class="code" href="namespacearm__compute.xhtml#a9172da722f0a434e5cc07c0a3c115d93afcefd647d6a866603c627b11347c707a">PoolingType::AVG</a>, 7, <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(2, 2, 0, 0)));</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  conv1x1[13].configure(&pool_out, &w_conv[13], &b_conv[13], &conv_out[14], <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>(1, 1, 0, 0));</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  logistic.configure(&conv_out[14], <span class="keyword">nullptr</span>, <a class="code" href="classarm__compute_1_1_activation_layer_info.xhtml">ActivationLayerInfo</a>(<a class="code" href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaa72ee60fba0509af07cbbd91398d8db9d">ActivationLayerInfo::ActivationFunction::LOGISTIC</a>));</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  reshape.configure(&conv_out[14], &output);</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  }</div><div class="ttc" id="namespacearm__compute_xhtml_a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe"><div class="ttname"><a href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa56c1e354d36beb85b0d881c5b2e24cbe">arm_compute::DimensionRoundingType::FLOOR</a></div><div class="ttdoc">Floor rounding. </div></div>
222 <div class="ttc" id="classarm__compute_1_1_activation_layer_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_activation_layer_info.xhtml">arm_compute::ActivationLayerInfo</a></div><div class="ttdoc">Activation Layer Information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00809">Types.h:809</a></div></div>
223 <div class="ttc" id="classarm__compute_1_1_pad_stride_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_pad_stride_info.xhtml">arm_compute::PadStrideInfo</a></div><div class="ttdoc">Padding and stride information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00571">Types.h:571</a></div></div>
224 <div class="ttc" id="classarm__compute_1_1_activation_layer_info_xhtml_a56297e0f7b215eea46c818cb7528d9eaa72ee60fba0509af07cbbd91398d8db9d"><div class="ttname"><a href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaa72ee60fba0509af07cbbd91398d8db9d">arm_compute::ActivationLayerInfo::ActivationFunction::LOGISTIC</a></div><div class="ttdoc">Logistic ( ) </div></div>
225 <div class="ttc" id="classarm__compute_1_1_activation_layer_info_xhtml_a56297e0f7b215eea46c818cb7528d9eaacc516ab03b98f1c908ddf6ed4a7c45e9"><div class="ttname"><a href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaacc516ab03b98f1c908ddf6ed4a7c45e9">arm_compute::ActivationLayerInfo::ActivationFunction::BOUNDED_RELU</a></div><div class="ttdoc">Upper Bounded Rectifier ( ) </div></div>
226 <div class="ttc" id="namespacearm__compute_xhtml_a9172da722f0a434e5cc07c0a3c115d93afcefd647d6a866603c627b11347c707a"><div class="ttname"><a href="namespacearm__compute.xhtml#a9172da722f0a434e5cc07c0a3c115d93afcefd647d6a866603c627b11347c707a">arm_compute::PoolingType::AVG</a></div><div class="ttdoc">Average Pooling. </div></div>
227 <div class="ttc" id="classarm__compute_1_1_pooling_layer_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_pooling_layer_info.xhtml">arm_compute::PoolingLayerInfo</a></div><div class="ttdoc">Pooling Layer Information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00688">Types.h:688</a></div></div>
228 </div><!-- fragment -->
231 <a class="anchor" id="ac8bb3912a3ce86b15842e79d0b421204"></a>
232 <div class="memitem">
233 <div class="memproto">
234 <table class="mlabels">
236 <td class="mlabels-left">
237 <table class="memname">
239 <td class="memname">void clear </td>
241 <td class="paramname"></td><td>)</td>
246 <td class="mlabels-right">
247 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
250 </div><div class="memdoc">
252 <p>Clear all allocated memory from the tensor objects. </p>
254 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00207">207</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
255 <div class="fragment"><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  {</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  input.allocator()->free();</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  output.allocator()->free();</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> </div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  w_conv3x3.allocator()->free();</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  b_conv3x3.allocator()->free();</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_conv.size(); ++i)</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>  w_conv[i].allocator()->free();</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  b_conv[i].allocator()->free();</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  }</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_dwc.size(); ++i)</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>  w_dwc[i].allocator()->free();</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  b_dwc[i].allocator()->free();</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  }</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> &o : conv_out)</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>  o.allocator()->free();</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  }</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  <span class="keywordflow">for</span>(<span class="keyword">auto</span> &o : dwc_out)</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  {</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  o.allocator()->free();</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  }</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  pool_out.allocator()->free();</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  }</div></div><!-- fragment -->
258 <a class="anchor" id="a3a41262ce9aed70a248ecefae646013b"></a>
259 <div class="memitem">
260 <div class="memproto">
261 <table class="mlabels">
263 <td class="mlabels-left">
264 <table class="memname">
266 <td class="memname">void feed </td>
268 <td class="paramtype">std::string </td>
269 <td class="paramname"><em>name</em></td><td>)</td>
274 <td class="mlabels-right">
275 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
278 </div><div class="memdoc">
280 <p>Feed input to network from file. </p>
281 <dl class="params"><dt>Parameters</dt><dd>
282 <table class="params">
283 <tr><td class="paramname">name</td><td>File name of containing the input data. </td></tr>
288 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00166">166</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
290 <p>References <a class="el" href="main_8cpp_source.xhtml#l00059">arm_compute::test::library</a>.</p>
291 <div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  {</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill_layer_data(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(input), name);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  }</div><div class="ttc" id="classarm__compute_1_1test_1_1_accessor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_accessor.xhtml">arm_compute::test::Accessor</a></div><div class="ttdoc">Accessor implementation for Tensor objects. </div><div class="ttdef"><b>Definition:</b> <a href="_accessor_8h_source.xhtml#l00035">Accessor.h:35</a></div></div>
292 <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a71326f0909d77386e29b511e1990a11f"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr< AssetsLibrary > library</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.xhtml#l00059">main.cpp:59</a></div></div>
293 </div><!-- fragment -->
296 <a class="anchor" id="a3b778cda9ac3fad08e7217edbcb942e0"></a>
297 <div class="memitem">
298 <div class="memproto">
299 <table class="mlabels">
301 <td class="mlabels-left">
302 <table class="memname">
304 <td class="memname">void fill_random </td>
306 <td class="paramname"></td><td>)</td>
311 <td class="mlabels-right">
312 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
315 </div><div class="memdoc">
317 <p>Fills the trainable parameters and input with random data. </p>
319 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00142">142</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
321 <p>References <a class="el" href="main_8cpp_source.xhtml#l00059">arm_compute::test::library</a>.</p>
322 <div class="fragment"><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>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> seed_idx = 0;</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  std::uniform_real_distribution<> distribution(-1, 1);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(input), distribution, seed_idx++);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(w_conv3x3), distribution, seed_idx++);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(b_conv3x3), distribution, seed_idx++);</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_conv.size(); ++i)</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  {</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(w_conv[i]), distribution, seed_idx++);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(b_conv[i]), distribution, seed_idx++);</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="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < w_dwc.size(); ++i)</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  {</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(w_dwc[i]), distribution, seed_idx++);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <a class="code" href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">library</a>->fill(<a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a>(b_dwc[i]), distribution, seed_idx++);</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  }</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  }</div><div class="ttc" id="classarm__compute_1_1test_1_1_accessor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_accessor.xhtml">arm_compute::test::Accessor</a></div><div class="ttdoc">Accessor implementation for Tensor objects. </div><div class="ttdef"><b>Definition:</b> <a href="_accessor_8h_source.xhtml#l00035">Accessor.h:35</a></div></div>
323 <div class="ttc" id="namespacearm__compute_1_1test_xhtml_a71326f0909d77386e29b511e1990a11f"><div class="ttname"><a href="namespacearm__compute_1_1test.xhtml#a71326f0909d77386e29b511e1990a11f">arm_compute::test::library</a></div><div class="ttdeci">std::unique_ptr< AssetsLibrary > library</div><div class="ttdef"><b>Definition:</b> <a href="main_8cpp_source.xhtml#l00059">main.cpp:59</a></div></div>
324 </div><!-- fragment -->
327 <a class="anchor" id="a1466ef70729f3c8b5da5ebfec3f53f26"></a>
328 <div class="memitem">
329 <div class="memproto">
330 <table class="mlabels">
332 <td class="mlabels-left">
333 <table class="memname">
335 <td class="memname">std::vector<unsigned int> get_classifications </td>
337 <td class="paramname"></td><td>)</td>
342 <td class="mlabels-right">
343 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
346 </div><div class="memdoc">
348 <p>Get the classification results. </p>
349 <dl class="section return"><dt>Returns</dt><dd><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> containing the classified labels </dd></dl>
351 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00175">175</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
353 <p>References <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00122">arm_compute::execute_window_loop()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00122">Dimensions< T >::num_dimensions()</a>, <a class="el" href="_window_8inl_source.xhtml#l00041">Window::set()</a>, <a class="el" href="_accessor_8h_source.xhtml#l00087">Accessor::shape()</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00081">Dimensions< T >::x()</a>.</p>
354 <div class="fragment"><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>  std::vector<unsigned int> classified_labels;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <a class="code" href="classarm__compute_1_1test_1_1_accessor.xhtml">Accessor</a> output_accessor(output);</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>  <a class="code" href="classarm__compute_1_1_window.xhtml">Window</a> window;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(<a class="code" href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">Window::DimX</a>, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">Window::Dimension</a>(0, 1, 1));</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> d = 1; d < output_accessor.shape().num_dimensions(); ++d)</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>  window.<a class="code" href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">set</a>(d, <a class="code" href="classarm__compute_1_1_window_1_1_dimension.xhtml">Window::Dimension</a>(0, output_accessor.shape()[d], 1));</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  }</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>  <a class="code" href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">execute_window_loop</a>(window, [&](<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> & <span class="keywordtype">id</span>)</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  {</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordtype">int</span> max_idx = 0;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  <span class="keywordtype">float</span> val = 0;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  <span class="keyword">const</span> <span class="keywordtype">void</span> *<span class="keyword">const</span> out_ptr = output_accessor(<span class="keywordtype">id</span>);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> l = 0; l < output_accessor.shape().x(); ++l)</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>  <span class="keywordtype">float</span> curr_val = <span class="keyword">reinterpret_cast<</span><span class="keyword">const </span><span class="keywordtype">float</span> *<span class="keyword">></span>(out_ptr)[l];</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">if</span>(curr_val > val)</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  {</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  max_idx = l;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  val = curr_val;</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  }</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  }</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  classified_labels.push_back(max_idx);</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  });</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="keywordflow">return</span> classified_labels;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  }</div><div class="ttc" id="classarm__compute_1_1_window_1_1_dimension_xhtml"><div class="ttname"><a href="classarm__compute_1_1_window_1_1_dimension.xhtml">arm_compute::Window::Dimension</a></div><div class="ttdoc">Describe one of the image&#39;s dimensions with a start, end and step. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00068">Window.h:68</a></div></div>
355 <div class="ttc" id="classarm__compute_1_1test_1_1_accessor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_accessor.xhtml">arm_compute::test::Accessor</a></div><div class="ttdoc">Accessor implementation for Tensor objects. </div><div class="ttdef"><b>Definition:</b> <a href="_accessor_8h_source.xhtml#l00035">Accessor.h:35</a></div></div>
356 <div class="ttc" id="classarm__compute_1_1_window_xhtml_aa96e81276ee4f87ab386cd05a5539a7d"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#aa96e81276ee4f87ab386cd05a5539a7d">arm_compute::Window::DimX</a></div><div class="ttdeci">static constexpr size_t DimX</div><div class="ttdoc">Alias for dimension 0 also known as X dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00043">Window.h:43</a></div></div>
357 <div class="ttc" id="namespacearm__compute_xhtml_a6c0dcc38187027dcb89cd9724bc5a823"><div class="ttname"><a href="namespacearm__compute.xhtml#a6c0dcc38187027dcb89cd9724bc5a823">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &w, L &&lambda_function, Ts &&...iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00122">Helpers.inl:122</a></div></div>
358 <div class="ttc" id="classarm__compute_1_1_coordinates_xhtml"><div class="ttname"><a href="classarm__compute_1_1_coordinates.xhtml">arm_compute::Coordinates</a></div><div class="ttdoc">Coordinates of an item. </div><div class="ttdef"><b>Definition:</b> <a href="_coordinates_8h_source.xhtml#l00037">Coordinates.h:37</a></div></div>
359 <div class="ttc" id="classarm__compute_1_1_window_xhtml_acd3d2bba51cb84d34dd7656ad2375a6e"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml#acd3d2bba51cb84d34dd7656ad2375a6e">arm_compute::Window::set</a></div><div class="ttdeci">void set(size_t dimension, const Dimension &dim)</div><div class="ttdoc">Set the values of a given dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8inl_source.xhtml#l00041">Window.inl:41</a></div></div>
360 <div class="ttc" id="classarm__compute_1_1_window_xhtml"><div class="ttname"><a href="classarm__compute_1_1_window.xhtml">arm_compute::Window</a></div><div class="ttdoc">Describe a multidimensional execution window. </div><div class="ttdef"><b>Definition:</b> <a href="_window_8h_source.xhtml#l00039">Window.h:39</a></div></div>
361 </div><!-- fragment -->
364 <a class="anchor" id="ae3ad9a7ab50bae85c5020f337adc7869"></a>
365 <div class="memitem">
366 <div class="memproto">
367 <table class="mlabels">
369 <td class="mlabels-left">
370 <table class="memname">
372 <td class="memname">void init </td>
374 <td class="paramtype">int </td>
375 <td class="paramname"><em>batches</em></td><td>)</td>
380 <td class="mlabels-right">
381 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
384 </div><div class="memdoc">
386 <p>Initialize the network. </p>
387 <dl class="params"><dt>Parameters</dt><dd>
388 <table class="params">
389 <tr><td class="paramdir">[in]</td><td class="paramname">batches</td><td>Number of batches. </td></tr>
394 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00060">60</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
396 <p>References <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, and <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p>
397 <div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  {</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  _batches = batches;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="comment">// Initialize input, output</span></div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  input.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(224U, 224U, 3U, _batches), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  output.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(11U, _batches), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">// Initialize weights and biases</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  w_conv3x3.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(3U, 3U, 3U, 16U), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  b_conv3x3.allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(16U), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  depthwise_conv_block_init(0, 16, 16);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  depthwise_conv_block_init(1, 16, 32);</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  depthwise_conv_block_init(2, 32, 32);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  depthwise_conv_block_init(3, 32, 64);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  depthwise_conv_block_init(4, 64, 64);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  depthwise_conv_block_init(5, 64, 128);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  depthwise_conv_block_init(6, 128, 128);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  depthwise_conv_block_init(7, 128, 128);</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  depthwise_conv_block_init(8, 128, 128);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  depthwise_conv_block_init(9, 128, 128);</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  depthwise_conv_block_init(10, 128, 128);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  depthwise_conv_block_init(11, 128, 256);</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  depthwise_conv_block_init(12, 256, 256);</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  w_conv[13].allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(1U, 1U, 256U, 11U), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  b_conv[13].allocator()->init(<a class="code" href="classarm__compute_1_1_tensor_info.xhtml">TensorInfo</a>(<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>(11U), 1, <a class="code" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">DataType::F32</a>));</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  }</div><div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml">arm_compute::TensorShape</a></div><div class="ttdoc">Shape of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00039">TensorShape.h:39</a></div></div>
398 <div class="ttc" id="namespacearm__compute_xhtml_ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda"><div class="ttname"><a href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::Format::F32</a></div><div class="ttdoc">1 channel, 1 F32 per channel </div></div>
399 <div class="ttc" id="classarm__compute_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_info.xhtml">arm_compute::TensorInfo</a></div><div class="ttdoc">Store the tensor&#39;s metadata. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_info_8h_source.xhtml#l00045">TensorInfo.h:45</a></div></div>
400 </div><!-- fragment -->
403 <a class="anchor" id="a13a43e6d814de94978c515cb084873b1"></a>
404 <div class="memitem">
405 <div class="memproto">
406 <table class="mlabels">
408 <td class="mlabels-left">
409 <table class="memname">
411 <td class="memname">void run </td>
413 <td class="paramname"></td><td>)</td>
418 <td class="mlabels-right">
419 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
422 </div><div class="memdoc">
424 <p>Runs the model. </p>
426 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00236">236</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
427 <div class="fragment"><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  {</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  conv3x3.run();</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  conv3x3_act.run();</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>  depthwise_conv_block_run(0);</div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  depthwise_conv_block_run(1);</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>  depthwise_conv_block_run(2);</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  depthwise_conv_block_run(3);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>  depthwise_conv_block_run(4);</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>  depthwise_conv_block_run(5);</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>  depthwise_conv_block_run(6);</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>  depthwise_conv_block_run(7);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>  depthwise_conv_block_run(8);</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>  depthwise_conv_block_run(9);</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>  depthwise_conv_block_run(10);</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>  depthwise_conv_block_run(11);</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  depthwise_conv_block_run(12);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  pool.run();</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  conv1x1[13].run();</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  logistic.run();</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  reshape.run();</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>  }</div></div><!-- fragment -->
430 <a class="anchor" id="ad55f80ed3cd8b6c4f247763b747016af"></a>
431 <div class="memitem">
432 <div class="memproto">
433 <table class="mlabels">
435 <td class="mlabels-left">
436 <table class="memname">
438 <td class="memname">void sync </td>
440 <td class="paramname"></td><td>)</td>
445 <td class="mlabels-right">
446 <span class="mlabels"><span class="mlabel">inline</span></span> </td>
449 </div><div class="memdoc">
451 <p>Sync the results. </p>
453 <p>Definition at line <a class="el" href="_mobile_net_network_8h_source.xhtml#l00260">260</a> of file <a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a>.</p>
455 <p>References <a class="el" href="classarm__compute_1_1_activation_layer_info.xhtml#a56297e0f7b215eea46c818cb7528d9eaacc516ab03b98f1c908ddf6ed4a7c45e9">ActivationLayerInfo::BOUNDED_RELU</a>, <a class="el" href="namespacearm__compute.xhtml#ab4e88c89b3b7ea1735996cc4def22d58a44ad4ef5a76e6aa6fb3e3fa079a54fda">arm_compute::F32</a>, and <a class="el" href="namespacearm__compute.xhtml#a1ce9b523fd4f3b5bbcadcd796183455aa4c614360da93c0a041b22e537de151eb">arm_compute::U</a>.</p>
456 <div class="fragment"><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  {</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  sync_if_necessary<TensorType>();</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  sync_tensor_if_necessary<TensorType>(output);</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  }</div></div><!-- fragment -->
459 <hr/>The documentation for this class was generated from the following file:<ul>
460 <li>tests/networks/<a class="el" href="_mobile_net_network_8h_source.xhtml">MobileNetNetwork.h</a></li>
462 </div><!-- contents -->
463 </div><!-- doc-content -->
464 <!-- start footer part -->
465 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
467 <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1networks.xhtml">networks</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1networks_1_1_mobile_net_network.xhtml">MobileNetNetwork</a></li>
468 <li class="footer">Generated on Wed May 23 2018 11:36:44 for Compute Library by
469 <a href="http://www.doxygen.org/index.html">
470 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>