Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!-- Copyright (c) 2020 ARM Limited. --> |
| 2 | <!-- --> |
| 3 | <!-- SPDX-License-Identifier: MIT --> |
| 4 | <!-- --> |
| 5 | <!-- HTML header for doxygen 1.8.13--> |
| 6 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 7 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 8 | <head> |
| 9 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 10 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 11 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 12 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> |
| 13 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 14 | <title>ArmNN: src/backends/backendsCommon/test/layerTests/FullyConnectedTestImpl.cpp File Reference</title> |
| 15 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 16 | <script type="text/javascript" src="jquery.js"></script> |
| 17 | <script type="text/javascript" src="dynsections.js"></script> |
| 18 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 19 | <script type="text/javascript" src="resize.js"></script> |
| 20 | <script type="text/javascript" src="navtreedata.js"></script> |
| 21 | <script type="text/javascript" src="navtree.js"></script> |
| 22 | <script type="text/javascript"> |
| 23 | $(document).ready(initResizable); |
| 24 | </script> |
| 25 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 26 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 27 | <script type="text/javascript" src="search/search.js"></script> |
| 28 | <script type="text/x-mathjax-config"> |
| 29 | MathJax.Hub.Config({ |
| 30 | extensions: ["tex2jax.js"], |
| 31 | jax: ["input/TeX","output/HTML-CSS"], |
| 32 | }); |
| 33 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| 34 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 35 | <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| 36 | </head> |
| 37 | <body> |
| 38 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 39 | <div id="titlearea"> |
| 40 | <table cellspacing="0" cellpadding="0"> |
| 41 | <tbody> |
| 42 | <tr style="height: 56px;"> |
| 43 | <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/> |
| 44 | <td style="padding-left: 0.5em;"> |
| 45 | <div id="projectname"> |
| 46 |  <span id="projectnumber">20.02</span> |
| 47 | </div> |
| 48 | </td> |
| 49 | </tr> |
| 50 | </tbody> |
| 51 | </table> |
| 52 | </div> |
| 53 | <!-- end header part --> |
| 54 | <!-- Generated by Doxygen 1.8.13 --> |
| 55 | <script type="text/javascript"> |
| 56 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 57 | </script> |
| 58 | <script type="text/javascript" src="menudata.js"></script> |
| 59 | <script type="text/javascript" src="menu.js"></script> |
| 60 | <script type="text/javascript"> |
| 61 | $(function() { |
| 62 | initMenu('',true,false,'search.php','Search'); |
| 63 | $(document).ready(function() { init_search(); }); |
| 64 | }); |
| 65 | </script> |
| 66 | <div id="main-nav"></div> |
| 67 | </div><!-- top --> |
| 68 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 69 | <div id="nav-tree"> |
| 70 | <div id="nav-tree-contents"> |
| 71 | <div id="nav-sync" class="sync"></div> |
| 72 | </div> |
| 73 | </div> |
| 74 | <div id="splitbar" style="-moz-user-select:none;" |
| 75 | class="ui-resizable-handle"> |
| 76 | </div> |
| 77 | </div> |
| 78 | <script type="text/javascript"> |
| 79 | $(document).ready(function(){initNavTree('_fully_connected_test_impl_8cpp.xhtml','');}); |
| 80 | </script> |
| 81 | <div id="doc-content"> |
| 82 | <!-- window showing the filter options --> |
| 83 | <div id="MSearchSelectWindow" |
| 84 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 85 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 86 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 87 | </div> |
| 88 | |
| 89 | <!-- iframe showing the search results (closed by default) --> |
| 90 | <div id="MSearchResultsWindow"> |
| 91 | <iframe src="javascript:void(0)" frameborder="0" |
| 92 | name="MSearchResults" id="MSearchResults"> |
| 93 | </iframe> |
| 94 | </div> |
| 95 | |
| 96 | <div class="header"> |
| 97 | <div class="summary"> |
| 98 | <a href="#func-members">Functions</a> </div> |
| 99 | <div class="headertitle"> |
| 100 | <div class="title">FullyConnectedTestImpl.cpp File Reference</div> </div> |
| 101 | </div><!--header--> |
| 102 | <div class="contents"> |
| 103 | <div class="textblock"><code>#include "<a class="el" href="_fully_connected_test_impl_8hpp_source.xhtml">FullyConnectedTestImpl.hpp</a>"</code><br /> |
| 104 | <code>#include <<a class="el" href="_quantize_helper_8hpp_source.xhtml">QuantizeHelper.hpp</a>></code><br /> |
| 105 | <code>#include <<a class="el" href="_cpu_tensor_handle_8hpp_source.xhtml">backendsCommon/CpuTensorHandle.hpp</a>></code><br /> |
| 106 | <code>#include <<a class="el" href="_data_type_utils_8hpp_source.xhtml">backendsCommon/test/DataTypeUtils.hpp</a>></code><br /> |
| 107 | <code>#include <<a class="el" href="_tensor_copy_utils_8hpp_source.xhtml">backendsCommon/test/TensorCopyUtils.hpp</a>></code><br /> |
| 108 | <code>#include <<a class="el" href="_workload_test_utils_8hpp_source.xhtml">backendsCommon/test/WorkloadTestUtils.hpp</a>></code><br /> |
| 109 | <code>#include <<a class="el" href="_tensor_helpers_8hpp_source.xhtml">test/TensorHelpers.hpp</a>></code><br /> |
| 110 | </div> |
| 111 | <p><a href="_fully_connected_test_impl_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 112 | <table class="memberdecls"> |
| 113 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 114 | Functions</h2></td></tr> |
| 115 | <tr class="memitem:a85031832a04444e2f419a746b4c59345"><td class="memTemplParams" colspan="2">template<typename T , typename B > </td></tr> |
| 116 | <tr class="memitem:a85031832a04444e2f419a746b4c59345"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< T, 2 > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a85031832a04444e2f419a746b4c59345">SimpleFullyConnectedTestImpl</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> outputTensorInfo, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> weightsDesc, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> biasesDesc, boost::multi_array< T, 2 > &weights, boost::multi_array< B, 1 > &bias, boost::multi_array< T, 4 > &input, bool biasEnabled, bool transposeWeights)</td></tr> |
| 117 | <tr class="separator:a85031832a04444e2f419a746b4c59345"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <tr class="memitem:a25b72d9cbe9cca2c89ba997e6f2cfb87"><td class="memTemplParams" colspan="2">template<armnn::DataType ArmnnType, typename T > </td></tr> |
| 119 | <tr class="memitem:a25b72d9cbe9cca2c89ba997e6f2cfb87"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< T, 2 > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a25b72d9cbe9cca2c89ba997e6f2cfb87">FullyConnectedTest</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool biasEnabled)</td></tr> |
| 120 | <tr class="separator:a25b72d9cbe9cca2c89ba997e6f2cfb87"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:ac2fd4978ceeccf895121c47b47cbd237"><td class="memTemplParams" colspan="2">template<armnn::DataType ArmnnType, typename T = armnn::ResolveType<ArmnnType>> </td></tr> |
| 122 | <tr class="memitem:ac2fd4978ceeccf895121c47b47cbd237"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< T, 2 > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#ac2fd4978ceeccf895121c47b47cbd237">FullyConnectedLargeTestCommon</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool transposeWeights, float qScale=0.0f, int32_t qOffset=0)</td></tr> |
| 123 | <tr class="separator:ac2fd4978ceeccf895121c47b47cbd237"><td class="memSeparator" colspan="2"> </td></tr> |
| 124 | <tr class="memitem:a3bcde1c62518c032c93eac1fa0ce6062"><td class="memItemLeft" align="right" valign="top">template <a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< <a class="el" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a>< <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a> >, 2 > </td><td class="memItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a3bcde1c62518c032c93eac1fa0ce6062">FullyConnectedTest< armnn::DataType::QAsymmU8 ></a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool biasEnabled)</td></tr> |
| 125 | <tr class="separator:a3bcde1c62518c032c93eac1fa0ce6062"><td class="memSeparator" colspan="2"> </td></tr> |
| 126 | <tr class="memitem:a5577e592bc21307937a26abbc908353f"><td class="memItemLeft" align="right" valign="top">template <a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< <a class="el" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a>< <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a053c769dcf82d66ef326c86980c02ba7">armnn::DataType::QSymmS16</a> >, 2 > </td><td class="memItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a5577e592bc21307937a26abbc908353f">FullyConnectedTest< armnn::DataType::QSymmS16 ></a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool biasEnabled)</td></tr> |
| 127 | <tr class="separator:a5577e592bc21307937a26abbc908353f"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:a9aa238fbd4c6a6d1259b31d2a51c93b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< float, 2 > </td><td class="memItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a9aa238fbd4c6a6d1259b31d2a51c93b8">FullyConnectedFloat32Test</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool biasEnabled, bool transposeWeights)</td></tr> |
| 129 | <tr class="separator:a9aa238fbd4c6a6d1259b31d2a51c93b8"><td class="memSeparator" colspan="2"> </td></tr> |
| 130 | <tr class="memitem:a0fb6957126b671361ccdd80f3549faa9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a>< float, 2 > </td><td class="memItemRight" valign="bottom"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml#a0fb6957126b671361ccdd80f3549faa9">FullyConnectedLargeTest</a> (<a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> &workloadFactory, const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> &memoryManager, bool transposeWeights)</td></tr> |
| 131 | <tr class="separator:a0fb6957126b671361ccdd80f3549faa9"><td class="memSeparator" colspan="2"> </td></tr> |
| 132 | </table> |
| 133 | <h2 class="groupheader">Function Documentation</h2> |
| 134 | <a id="a9aa238fbd4c6a6d1259b31d2a51c93b8"></a> |
| 135 | <h2 class="memtitle"><span class="permalink"><a href="#a9aa238fbd4c6a6d1259b31d2a51c93b8">◆ </a></span>FullyConnectedFloat32Test()</h2> |
| 136 | |
| 137 | <div class="memitem"> |
| 138 | <div class="memproto"> |
| 139 | <table class="memname"> |
| 140 | <tr> |
| 141 | <td class="memname"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><float, 2> FullyConnectedFloat32Test </td> |
| 142 | <td>(</td> |
| 143 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 144 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 145 | </tr> |
| 146 | <tr> |
| 147 | <td class="paramkey"></td> |
| 148 | <td></td> |
| 149 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 150 | <td class="paramname"><em>memoryManager</em>, </td> |
| 151 | </tr> |
| 152 | <tr> |
| 153 | <td class="paramkey"></td> |
| 154 | <td></td> |
| 155 | <td class="paramtype">bool </td> |
| 156 | <td class="paramname"><em>biasEnabled</em>, </td> |
| 157 | </tr> |
| 158 | <tr> |
| 159 | <td class="paramkey"></td> |
| 160 | <td></td> |
| 161 | <td class="paramtype">bool </td> |
| 162 | <td class="paramname"><em>transposeWeights</em> </td> |
| 163 | </tr> |
| 164 | <tr> |
| 165 | <td></td> |
| 166 | <td>)</td> |
| 167 | <td></td><td></td> |
| 168 | </tr> |
| 169 | </table> |
| 170 | </div><div class="memdoc"> |
| 171 | |
| 172 | <p class="definition">Definition at line <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml#l00247">247</a> of file <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml">FullyConnectedTestImpl.cpp</a>.</p> |
| 173 | |
| 174 | <p class="reference">References <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_layer_test_result_8hpp_source.xhtml#l00041">LayerTestResult< T, n >::outputExpected</a>, and <a class="el" href="_descriptors_8cpp_source.xhtml#l00342">armnn::swap()</a>.</p> |
| 175 | <div class="fragment"><div class="line"><a name="l00252"></a><span class="lineno"> 252</span> {</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputWidth = 1;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputHeight = 1;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputChannels = 5;</div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputNum = 2;</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span> </div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputChannels = 3;</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputNum = 2;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span> </div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>  <span class="comment">// Define the tensor descriptors.</span></div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo;</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> outputTensorInfo;</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> weightsDesc;</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> biasesDesc;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputShape[] = { inputNum, inputChannels, inputHeight, inputWidth };</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputShape[] = { outputNum, outputChannels };</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weightsShape[] = { inputChannels, outputChannels };</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span> </div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  <span class="keywordflow">if</span> (transposeWeights)</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>  {</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>  <a class="code" href="namespacearmnn.xhtml#a14d7f180bf51e86850305965c3707e07">std::swap</a>(weightsShape[0], weightsShape[1]);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>  }</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span> </div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> biasShape[] = { outputChannels };</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>  inputTensorInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(4, inputShape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>  outputTensorInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(2, outputShape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>  weightsDesc = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(2, weightsShape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>  biasesDesc = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(1, biasShape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>);</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span> </div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>  <a class="code" href="struct_layer_test_result.xhtml">LayerTestResult<float, 2></a> result(outputTensorInfo);</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span> </div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>  boost::multi_array<float, 4> input = MakeTensor<float, 4>(inputTensorInfo, std::vector<float>(</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>  {</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>  1.0f, 2.0f, 3.0f, 4.0f, 5.0f,</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span> </div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>  5.0f, 4.0f, 3.0f, 2.0f, 1.0f</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>  })</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>  );</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> </div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  boost::multi_array<float, 2> weights = MakeTensor<float, 2>(weightsDesc, std::vector<float>(</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>  {</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>  .5f, 2.f, .5f,</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>  .5f, 2.f, 1.f,</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>  .5f, 2.f, 2.f,</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>  .5f, 2.f, 3.f,</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>  .5f, 2.f, 4.f</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  }));</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span> </div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  <span class="keywordflow">if</span> (transposeWeights)</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  {</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  weights = MakeTensor<float, 2>(weightsDesc, std::vector<float>(</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  {</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  .5f, .5f, .5f, .5f, .5f,</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  2.f, 2.f, 2.f, 2.f, 2.f,</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  .5f, 1.f, 2.f, 3.f, 4.f</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  }));</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  }</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span> </div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span> </div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>  std::vector<float> biasValues({0.f, 0.f, 0.f});</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>  <span class="keywordflow">if</span> (biasEnabled)</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>  {</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  biasValues = std::vector<float>({10.f, 20.f, 30.f});</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  }</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  boost::multi_array<float, 1> bias = MakeTensor<float, 1>(biasesDesc, biasValues);</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span> </div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  result = SimpleFullyConnectedTestImpl<float>(</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>  workloadFactory,</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  memoryManager,</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  inputTensorInfo, outputTensorInfo,</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>  weightsDesc, biasesDesc,</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>  weights, bias, input,</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>  biasEnabled, transposeWeights</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>  );</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span> </div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>  result.outputExpected = MakeTensor<float, 2>(outputTensorInfo, std::vector<float>(</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>  {</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span>  0.5f + 1.0f + 1.5f + 2.0f + 2.5f + biasValues[0],</div><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>  2.0f + 4.0f + 6.0f + 8.0f + 10.f + biasValues[1],</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>  0.5f + 2.0f + 6.0f + 12.f + 20.f + biasValues[2],</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span> </div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>  2.5f + 2.0f + 1.5f + 1.0f + 0.5f + biasValues[0],</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>  10.0f + 8.0f + 6.0f + 4.0f + 2.f + biasValues[1],</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>  2.5f + 4.0f + 6.0f + 6.f + 4.f + biasValues[2]</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>  })</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>  );</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> </div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span> }</div><div class="ttc" id="namespacearmnn_xhtml_a14d7f180bf51e86850305965c3707e07"><div class="ttname"><a href="namespacearmnn.xhtml#a14d7f180bf51e86850305965c3707e07">armnn::swap</a></div><div class="ttdeci">void swap(OriginsDescriptor &first, OriginsDescriptor &second)</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8cpp_source.xhtml#l00342">Descriptors.cpp:342</a></div></div> |
| 176 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 177 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 178 | <div class="ttc" id="struct_layer_test_result_xhtml"><div class="ttname"><a href="struct_layer_test_result.xhtml">LayerTestResult</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_test_result_8hpp_source.xhtml#l00029">LayerTestResult.hpp:29</a></div></div> |
| 179 | </div><!-- fragment --> |
| 180 | </div> |
| 181 | </div> |
| 182 | <a id="a0fb6957126b671361ccdd80f3549faa9"></a> |
| 183 | <h2 class="memtitle"><span class="permalink"><a href="#a0fb6957126b671361ccdd80f3549faa9">◆ </a></span>FullyConnectedLargeTest()</h2> |
| 184 | |
| 185 | <div class="memitem"> |
| 186 | <div class="memproto"> |
| 187 | <table class="memname"> |
| 188 | <tr> |
| 189 | <td class="memname"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><float, 2> FullyConnectedLargeTest </td> |
| 190 | <td>(</td> |
| 191 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 192 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 193 | </tr> |
| 194 | <tr> |
| 195 | <td class="paramkey"></td> |
| 196 | <td></td> |
| 197 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 198 | <td class="paramname"><em>memoryManager</em>, </td> |
| 199 | </tr> |
| 200 | <tr> |
| 201 | <td class="paramkey"></td> |
| 202 | <td></td> |
| 203 | <td class="paramtype">bool </td> |
| 204 | <td class="paramname"><em>transposeWeights</em> </td> |
| 205 | </tr> |
| 206 | <tr> |
| 207 | <td></td> |
| 208 | <td>)</td> |
| 209 | <td></td><td></td> |
| 210 | </tr> |
| 211 | </table> |
| 212 | </div><div class="memdoc"> |
| 213 | |
| 214 | <p class="definition">Definition at line <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml#l00344">344</a> of file <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml">FullyConnectedTestImpl.cpp</a>.</p> |
| 215 | <div class="fragment"><div class="line"><a name="l00348"></a><span class="lineno"> 348</span> {</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keywordflow">return</span> FullyConnectedLargeTestCommon<armnn::DataType::Float32>(workloadFactory, memoryManager, transposeWeights);</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> }</div></div><!-- fragment --> |
| 216 | </div> |
| 217 | </div> |
| 218 | <a id="ac2fd4978ceeccf895121c47b47cbd237"></a> |
| 219 | <h2 class="memtitle"><span class="permalink"><a href="#ac2fd4978ceeccf895121c47b47cbd237">◆ </a></span>FullyConnectedLargeTestCommon()</h2> |
| 220 | |
| 221 | <div class="memitem"> |
| 222 | <div class="memproto"> |
| 223 | <table class="memname"> |
| 224 | <tr> |
| 225 | <td class="memname"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><T, 2> FullyConnectedLargeTestCommon </td> |
| 226 | <td>(</td> |
| 227 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 228 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 229 | </tr> |
| 230 | <tr> |
| 231 | <td class="paramkey"></td> |
| 232 | <td></td> |
| 233 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 234 | <td class="paramname"><em>memoryManager</em>, </td> |
| 235 | </tr> |
| 236 | <tr> |
| 237 | <td class="paramkey"></td> |
| 238 | <td></td> |
| 239 | <td class="paramtype">bool </td> |
| 240 | <td class="paramname"><em>transposeWeights</em>, </td> |
| 241 | </tr> |
| 242 | <tr> |
| 243 | <td class="paramkey"></td> |
| 244 | <td></td> |
| 245 | <td class="paramtype">float </td> |
| 246 | <td class="paramname"><em>qScale</em> = <code>0.0f</code>, </td> |
| 247 | </tr> |
| 248 | <tr> |
| 249 | <td class="paramkey"></td> |
| 250 | <td></td> |
| 251 | <td class="paramtype">int32_t </td> |
| 252 | <td class="paramname"><em>qOffset</em> = <code>0</code> </td> |
| 253 | </tr> |
| 254 | <tr> |
| 255 | <td></td> |
| 256 | <td>)</td> |
| 257 | <td></td><td></td> |
| 258 | </tr> |
| 259 | </table> |
| 260 | </div><div class="memdoc"> |
| 261 | |
| 262 | <p class="definition">Definition at line <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml#l00148">148</a> of file <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml">FullyConnectedTestImpl.cpp</a>.</p> |
| 263 | |
| 264 | <p class="reference">References <a class="el" href="_layer_test_result_8hpp_source.xhtml#l00041">LayerTestResult< T, n >::outputExpected</a>, <a class="el" href="_tensor_8cpp_source.xhtml#l00275">TensorInfo::SetQuantizationOffset()</a>, <a class="el" href="_tensor_8cpp_source.xhtml#l00259">TensorInfo::SetQuantizationScale()</a>, and <a class="el" href="_descriptors_8cpp_source.xhtml#l00342">armnn::swap()</a>.</p> |
| 265 | <div class="fragment"><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="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputWidth = 1;</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputHeight = 1;</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputChannels = 5;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputNum = 1;</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>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputChannels = 1;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputNum = 1;</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span> </div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="comment">// Define the tensor descriptors.</span></div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> outputTensorInfo;</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> weightsDesc;</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> biasesDesc;</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> </div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputShape[] = { inputNum, inputChannels, inputHeight, inputWidth };</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputShape[] = { outputNum, outputChannels };</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weightsShape[] = { inputChannels, outputChannels };</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  <span class="keywordflow">if</span> (transposeWeights)</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  {</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="namespacearmnn.xhtml#a14d7f180bf51e86850305965c3707e07">std::swap</a>(weightsShape[0], weightsShape[1]);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  }</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> biasShape[] = { outputChannels };</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span> </div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  inputTensorInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(4, inputShape, ArmnnType);</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  outputTensorInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(2, outputShape, ArmnnType);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  weightsDesc = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(2, weightsShape, ArmnnType);</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  biasesDesc = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(1, biasShape, ArmnnType);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="comment">// Set quantization parameters if the requested type is a quantized type.</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">if</span>(armnn::IsQuantizedType<T>())</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>  inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(qScale);</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a63cbc581012c957f9d68d224ddc3e43c">SetQuantizationOffset</a>(qOffset);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  outputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(qScale);</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  outputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a63cbc581012c957f9d68d224ddc3e43c">SetQuantizationOffset</a>(qOffset);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span> </div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>  <a class="code" href="struct_layer_test_result.xhtml">LayerTestResult<T, 2></a> result(outputTensorInfo);</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  boost::multi_array<T, 4> input = MakeTensor<T, 4>(inputTensorInfo,</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  armnnUtils::QuantizedVector<T>({</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  1.0f, 10.0f, 100.0f, 1000.0f, 10000.0f,</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>  },</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  qScale, qOffset)</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> </div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  boost::multi_array<T, 2> weights = MakeTensor<T, 2>(weightsDesc,</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  armnnUtils::QuantizedVector<T>({</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>  2.0f, 3.0f, 4.0f, 5.0f, 6.0f</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>  },</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  qScale, qOffset)</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  );</div><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>  std::vector<T> biasValues({900000.f});</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>  boost::multi_array<T, 1> bias = MakeTensor<T, 1>(biasesDesc, biasValues);</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>  result = SimpleFullyConnectedTestImpl<T>(</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  workloadFactory,</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  memoryManager,</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  inputTensorInfo, outputTensorInfo,</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  weightsDesc, biasesDesc,</div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>  weights, bias, input,</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  <span class="keyword">true</span>, transposeWeights</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  );</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>  result.outputExpected = MakeTensor<T, 2>(outputTensorInfo,</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  armnnUtils::QuantizedVector<T>({ 965432.0f }, qScale, qOffset));</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">return</span> result;</div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span> }</div><div class="ttc" id="namespacearmnn_xhtml_a14d7f180bf51e86850305965c3707e07"><div class="ttname"><a href="namespacearmnn.xhtml#a14d7f180bf51e86850305965c3707e07">armnn::swap</a></div><div class="ttdeci">void swap(OriginsDescriptor &first, OriginsDescriptor &second)</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8cpp_source.xhtml#l00342">Descriptors.cpp:342</a></div></div> |
| 266 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 267 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a685739c4eb65a580e075282cfe6787d6"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">armnn::TensorInfo::SetQuantizationScale</a></div><div class="ttdeci">void SetQuantizationScale(float scale)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.xhtml#l00259">Tensor.cpp:259</a></div></div> |
| 268 | <div class="ttc" id="struct_layer_test_result_xhtml"><div class="ttname"><a href="struct_layer_test_result.xhtml">LayerTestResult</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_test_result_8hpp_source.xhtml#l00029">LayerTestResult.hpp:29</a></div></div> |
| 269 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a63cbc581012c957f9d68d224ddc3e43c"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a63cbc581012c957f9d68d224ddc3e43c">armnn::TensorInfo::SetQuantizationOffset</a></div><div class="ttdeci">void SetQuantizationOffset(int32_t offset)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.xhtml#l00275">Tensor.cpp:275</a></div></div> |
| 270 | </div><!-- fragment --> |
| 271 | </div> |
| 272 | </div> |
| 273 | <a id="a25b72d9cbe9cca2c89ba997e6f2cfb87"></a> |
| 274 | <h2 class="memtitle"><span class="permalink"><a href="#a25b72d9cbe9cca2c89ba997e6f2cfb87">◆ </a></span>FullyConnectedTest()</h2> |
| 275 | |
| 276 | <div class="memitem"> |
| 277 | <div class="memproto"> |
| 278 | <table class="memname"> |
| 279 | <tr> |
| 280 | <td class="memname"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><T, 2> FullyConnectedTest </td> |
| 281 | <td>(</td> |
| 282 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 283 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 284 | </tr> |
| 285 | <tr> |
| 286 | <td class="paramkey"></td> |
| 287 | <td></td> |
| 288 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 289 | <td class="paramname"><em>memoryManager</em>, </td> |
| 290 | </tr> |
| 291 | <tr> |
| 292 | <td class="paramkey"></td> |
| 293 | <td></td> |
| 294 | <td class="paramtype">bool </td> |
| 295 | <td class="paramname"><em>biasEnabled</em> </td> |
| 296 | </tr> |
| 297 | <tr> |
| 298 | <td></td> |
| 299 | <td>)</td> |
| 300 | <td></td><td></td> |
| 301 | </tr> |
| 302 | </table> |
| 303 | </div><div class="memdoc"> |
| 304 | |
| 305 | <p class="definition">Definition at line <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml#l00071">71</a> of file <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml">FullyConnectedTestImpl.cpp</a>.</p> |
| 306 | |
| 307 | <p class="reference">References <a class="el" href="_layer_support_rules_8hpp_source.xhtml#l00014">armnn::GetBiasTypeFromWeightsType()</a>, <a class="el" href="_layer_test_result_8hpp_source.xhtml#l00041">LayerTestResult< T, n >::outputExpected</a>, <a class="el" href="_tensor_8cpp_source.xhtml#l00259">TensorInfo::SetQuantizationScale()</a>, and <a class="el" href="_cl_layer_tests_8cpp_source.xhtml#l00202">true</a>.</p> |
| 308 | <div class="fragment"><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> {</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  constexpr <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputWidth = 3u;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  constexpr <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputHeight = 2u;</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  constexpr <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputChannels = 1u;</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  constexpr <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputSize = inputWidth * inputHeight * inputChannels;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  constexpr <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputChannels = 2u;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo({ 1, inputChannels, inputHeight, inputWidth }, ArmnnType);</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(0.1f);</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  inputTensorInfo.SetQuantizationOffset(63);</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> </div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> outputTensorInfo({ 1, outputChannels }, ArmnnType);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  outputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(5.f);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  outputTensorInfo.SetQuantizationOffset(biasEnabled ? -50 : 10);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span> </div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> weightsDesc({ outputChannels, inputSize }, ArmnnType);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  weightsDesc.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(0.2f);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  weightsDesc.SetQuantizationOffset(93);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> biasesDesc({ outputChannels }, <a class="code" href="namespacearmnn.xhtml#a83c4a275acf59f62b8387f389d0929d5">GetBiasTypeFromWeightsType</a>(weightsDesc.GetDataType()).value());</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  biasesDesc.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">SetQuantizationScale</a>(inputTensorInfo.GetQuantizationScale() * weightsDesc.GetQuantizationScale());</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  biasesDesc.SetQuantizationOffset(0);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="struct_layer_test_result.xhtml">LayerTestResult<T, 2></a> result(outputTensorInfo);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <span class="keyword">auto</span> input = MakeTensor<T, 4>(inputTensorInfo, ConvertToDataType<ArmnnType>(</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  -1.2f, 6.1f, -3.5f,</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  18.8f, -5.5f, 2.9f</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  },</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  inputTensorInfo));</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span> </div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="keyword">auto</span> weights = MakeTensor<T, 2>(weightsDesc, ConvertToDataType<ArmnnType>(</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  {</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  -8.4f, 20.0f, -10.4f, -8, 16.4f, -11.8f,</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  23.4f, 10.4f, -14.0f, -3.8f, -11.8f, 11.4f</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  },</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  weightsDesc));</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keyword">auto</span> bias = MakeTensor<int32_t, 1>(biasesDesc, std::vector<int32_t>{9250, 67500});</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>  result = SimpleFullyConnectedTestImpl<T>(</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  workloadFactory,</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  memoryManager,</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  inputTensorInfo, outputTensorInfo,</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  weightsDesc, biasesDesc,</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  weights, bias, input,</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  biasEnabled, <a class="code" href="_cl_layer_tests_8cpp.xhtml#a37f1c3ccc9fc906be85185350dd83d48">true</a></div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  );</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>  <span class="keywordflow">if</span> (biasEnabled)</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  {</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  result.outputExpected = MakeTensor<T, 2>(outputTensorInfo,</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  ConvertToDataType<ArmnnType>({80.f, 1460.f}, outputTensorInfo));</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>  <span class="keywordflow">else</span></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>  result.outputExpected = MakeTensor<T, 2>(outputTensorInfo,</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  ConvertToDataType<ArmnnType>({-107.04f, 110.f}, outputTensorInfo));</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  }</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>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 309 | <div class="ttc" id="_cl_layer_tests_8cpp_xhtml_a37f1c3ccc9fc906be85185350dd83d48"><div class="ttname"><a href="_cl_layer_tests_8cpp.xhtml#a37f1c3ccc9fc906be85185350dd83d48">true</a></div><div class="ttdeci">DataLayout::NCHW DataLayout::NCHW DataLayout::NHWC DataLayout::NHWC true</div><div class="ttdef"><b>Definition:</b> <a href="_cl_layer_tests_8cpp_source.xhtml#l00202">ClLayerTests.cpp:202</a></div></div> |
| 310 | <div class="ttc" id="namespacearmnn_xhtml_a83c4a275acf59f62b8387f389d0929d5"><div class="ttname"><a href="namespacearmnn.xhtml#a83c4a275acf59f62b8387f389d0929d5">armnn::GetBiasTypeFromWeightsType</a></div><div class="ttdeci">armnn::Optional< armnn::DataType > GetBiasTypeFromWeightsType(armnn::Optional< armnn::DataType > weightsType)</div><div class="ttdef"><b>Definition:</b> <a href="_layer_support_rules_8hpp_source.xhtml#l00014">LayerSupportRules.hpp:14</a></div></div> |
| 311 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a685739c4eb65a580e075282cfe6787d6"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a685739c4eb65a580e075282cfe6787d6">armnn::TensorInfo::SetQuantizationScale</a></div><div class="ttdeci">void SetQuantizationScale(float scale)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8cpp_source.xhtml#l00259">Tensor.cpp:259</a></div></div> |
| 312 | <div class="ttc" id="struct_layer_test_result_xhtml"><div class="ttname"><a href="struct_layer_test_result.xhtml">LayerTestResult</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_test_result_8hpp_source.xhtml#l00029">LayerTestResult.hpp:29</a></div></div> |
| 313 | </div><!-- fragment --> |
| 314 | </div> |
| 315 | </div> |
| 316 | <a id="a3bcde1c62518c032c93eac1fa0ce6062"></a> |
| 317 | <h2 class="memtitle"><span class="permalink"><a href="#a3bcde1c62518c032c93eac1fa0ce6062">◆ </a></span>FullyConnectedTest< armnn::DataType::QAsymmU8 >()</h2> |
| 318 | |
| 319 | <div class="memitem"> |
| 320 | <div class="memproto"> |
| 321 | <table class="memname"> |
| 322 | <tr> |
| 323 | <td class="memname">template <a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><<a class="el" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a><<a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a>>, 2> <a class="el" href="_fully_connected_test_impl_8hpp.xhtml#a25b72d9cbe9cca2c89ba997e6f2cfb87">FullyConnectedTest</a>< <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a0a3f57c876f5a230244c38e1453a8a6e">armnn::DataType::QAsymmU8</a> > </td> |
| 324 | <td>(</td> |
| 325 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 326 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 327 | </tr> |
| 328 | <tr> |
| 329 | <td class="paramkey"></td> |
| 330 | <td></td> |
| 331 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 332 | <td class="paramname"><em>memoryManager</em>, </td> |
| 333 | </tr> |
| 334 | <tr> |
| 335 | <td class="paramkey"></td> |
| 336 | <td></td> |
| 337 | <td class="paramtype">bool </td> |
| 338 | <td class="paramname"><em>biasEnabled</em> </td> |
| 339 | </tr> |
| 340 | <tr> |
| 341 | <td></td> |
| 342 | <td>)</td> |
| 343 | <td></td><td></td> |
| 344 | </tr> |
| 345 | </table> |
| 346 | </div><div class="memdoc"> |
| 347 | |
| 348 | </div> |
| 349 | </div> |
| 350 | <a id="a5577e592bc21307937a26abbc908353f"></a> |
| 351 | <h2 class="memtitle"><span class="permalink"><a href="#a5577e592bc21307937a26abbc908353f">◆ </a></span>FullyConnectedTest< armnn::DataType::QSymmS16 >()</h2> |
| 352 | |
| 353 | <div class="memitem"> |
| 354 | <div class="memproto"> |
| 355 | <table class="memname"> |
| 356 | <tr> |
| 357 | <td class="memname">template <a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><<a class="el" href="namespacearmnn.xhtml#a0743ed5e860c316a20b68ca96301b411">armnn::ResolveType</a><<a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a053c769dcf82d66ef326c86980c02ba7">armnn::DataType::QSymmS16</a>>, 2> <a class="el" href="_fully_connected_test_impl_8hpp.xhtml#a25b72d9cbe9cca2c89ba997e6f2cfb87">FullyConnectedTest</a>< <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a053c769dcf82d66ef326c86980c02ba7">armnn::DataType::QSymmS16</a> > </td> |
| 358 | <td>(</td> |
| 359 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 360 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 361 | </tr> |
| 362 | <tr> |
| 363 | <td class="paramkey"></td> |
| 364 | <td></td> |
| 365 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 366 | <td class="paramname"><em>memoryManager</em>, </td> |
| 367 | </tr> |
| 368 | <tr> |
| 369 | <td class="paramkey"></td> |
| 370 | <td></td> |
| 371 | <td class="paramtype">bool </td> |
| 372 | <td class="paramname"><em>biasEnabled</em> </td> |
| 373 | </tr> |
| 374 | <tr> |
| 375 | <td></td> |
| 376 | <td>)</td> |
| 377 | <td></td><td></td> |
| 378 | </tr> |
| 379 | </table> |
| 380 | </div><div class="memdoc"> |
| 381 | |
| 382 | </div> |
| 383 | </div> |
| 384 | <a id="a85031832a04444e2f419a746b4c59345"></a> |
| 385 | <h2 class="memtitle"><span class="permalink"><a href="#a85031832a04444e2f419a746b4c59345">◆ </a></span>SimpleFullyConnectedTestImpl()</h2> |
| 386 | |
| 387 | <div class="memitem"> |
| 388 | <div class="memproto"> |
| 389 | <table class="memname"> |
| 390 | <tr> |
| 391 | <td class="memname"><a class="el" href="struct_layer_test_result.xhtml">LayerTestResult</a><T, 2> SimpleFullyConnectedTestImpl </td> |
| 392 | <td>(</td> |
| 393 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_workload_factory.xhtml">armnn::IWorkloadFactory</a> & </td> |
| 394 | <td class="paramname"><em>workloadFactory</em>, </td> |
| 395 | </tr> |
| 396 | <tr> |
| 397 | <td class="paramkey"></td> |
| 398 | <td></td> |
| 399 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_i_backend_internal.xhtml#a693b40e6b94e958836aeb0410ca186bd">armnn::IBackendInternal::IMemoryManagerSharedPtr</a> & </td> |
| 400 | <td class="paramname"><em>memoryManager</em>, </td> |
| 401 | </tr> |
| 402 | <tr> |
| 403 | <td class="paramkey"></td> |
| 404 | <td></td> |
| 405 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> </td> |
| 406 | <td class="paramname"><em>inputTensorInfo</em>, </td> |
| 407 | </tr> |
| 408 | <tr> |
| 409 | <td class="paramkey"></td> |
| 410 | <td></td> |
| 411 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> </td> |
| 412 | <td class="paramname"><em>outputTensorInfo</em>, </td> |
| 413 | </tr> |
| 414 | <tr> |
| 415 | <td class="paramkey"></td> |
| 416 | <td></td> |
| 417 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> </td> |
| 418 | <td class="paramname"><em>weightsDesc</em>, </td> |
| 419 | </tr> |
| 420 | <tr> |
| 421 | <td class="paramkey"></td> |
| 422 | <td></td> |
| 423 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> </td> |
| 424 | <td class="paramname"><em>biasesDesc</em>, </td> |
| 425 | </tr> |
| 426 | <tr> |
| 427 | <td class="paramkey"></td> |
| 428 | <td></td> |
| 429 | <td class="paramtype">boost::multi_array< T, 2 > & </td> |
| 430 | <td class="paramname"><em>weights</em>, </td> |
| 431 | </tr> |
| 432 | <tr> |
| 433 | <td class="paramkey"></td> |
| 434 | <td></td> |
| 435 | <td class="paramtype">boost::multi_array< B, 1 > & </td> |
| 436 | <td class="paramname"><em>bias</em>, </td> |
| 437 | </tr> |
| 438 | <tr> |
| 439 | <td class="paramkey"></td> |
| 440 | <td></td> |
| 441 | <td class="paramtype">boost::multi_array< T, 4 > & </td> |
| 442 | <td class="paramname"><em>input</em>, </td> |
| 443 | </tr> |
| 444 | <tr> |
| 445 | <td class="paramkey"></td> |
| 446 | <td></td> |
| 447 | <td class="paramtype">bool </td> |
| 448 | <td class="paramname"><em>biasEnabled</em>, </td> |
| 449 | </tr> |
| 450 | <tr> |
| 451 | <td class="paramkey"></td> |
| 452 | <td></td> |
| 453 | <td class="paramtype">bool </td> |
| 454 | <td class="paramname"><em>transposeWeights</em> </td> |
| 455 | </tr> |
| 456 | <tr> |
| 457 | <td></td> |
| 458 | <td>)</td> |
| 459 | <td></td><td></td> |
| 460 | </tr> |
| 461 | </table> |
| 462 | </div><div class="memdoc"> |
| 463 | |
| 464 | <p class="definition">Definition at line <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml#l00024">24</a> of file <a class="el" href="_fully_connected_test_impl_8cpp_source.xhtml">FullyConnectedTestImpl.cpp</a>.</p> |
| 465 | |
| 466 | <p class="reference">References <a class="el" href="_tensor_copy_utils_8cpp_source.xhtml#l00019">AllocateAndCopyDataToITensorHandle()</a>, <a class="el" href="_tensor_copy_utils_8cpp_source.xhtml#l00014">CopyDataFromITensorHandle()</a>, <a class="el" href="_tensor_copy_utils_8cpp_source.xhtml#l00009">CopyDataToITensorHandle()</a>, <a class="el" href="_workload_factory_8cpp_source.xhtml#l01225">IWorkloadFactory::CreateFullyConnected()</a>, <a class="el" href="classarmnn_1_1_i_workload_factory.xhtml#a15c140be4ddceffee16436f009d3ed94">IWorkloadFactory::CreateTensorHandle()</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="_workload_data_8hpp_source.xhtml#l00150">FullyConnectedQueueDescriptor::m_Bias</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00386">FullyConnectedDescriptor::m_BiasEnabled</a>, <a class="el" href="_workload_data_8hpp_source.xhtml#l00049">QueueDescriptorWithParameters< LayerDescriptor >::m_Parameters</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00388">FullyConnectedDescriptor::m_TransposeWeightMatrix</a>, <a class="el" href="_workload_data_8hpp_source.xhtml#l00149">FullyConnectedQueueDescriptor::m_Weight</a>, and <a class="el" href="_layer_test_result_8hpp_source.xhtml#l00040">LayerTestResult< T, n >::output</a>.</p> |
| 467 | <div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="namespacearmnn.xhtml#a44affeeb090c3c6a3062830562672e84">IgnoreUnused</a>(memoryManager);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  std::unique_ptr<armnn::ITensorHandle> inputHandle = workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.xhtml#a15c140be4ddceffee16436f009d3ed94">CreateTensorHandle</a>(inputTensorInfo);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  std::unique_ptr<armnn::ITensorHandle> outputHandle = workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.xhtml#a15c140be4ddceffee16436f009d3ed94">CreateTensorHandle</a>(outputTensorInfo);</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  <a class="code" href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml">armnn::FullyConnectedQueueDescriptor</a> data;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <a class="code" href="structarmnn_1_1_workload_info.xhtml">armnn::WorkloadInfo</a> <a class="code" href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">info</a>;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <a class="code" href="classarmnn_1_1_scoped_cpu_tensor_handle.xhtml">armnn::ScopedCpuTensorHandle</a> weightsTensor(weightsDesc);</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <a class="code" href="classarmnn_1_1_scoped_cpu_tensor_handle.xhtml">armnn::ScopedCpuTensorHandle</a> biasTensor(biasesDesc);</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <a class="code" href="_tensor_copy_utils_8cpp.xhtml#afaaca8c3f3a467d124bba44067d2afa8">AllocateAndCopyDataToITensorHandle</a>(&weightsTensor, &weights[0][0]);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <a class="code" href="_tensor_copy_utils_8cpp.xhtml#afaaca8c3f3a467d124bba44067d2afa8">AllocateAndCopyDataToITensorHandle</a>(&biasTensor, &bias[0]);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  AddInputToWorkload(data, info, inputTensorInfo, inputHandle.get());</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  AddOutputToWorkload(data, info, outputTensorInfo, outputHandle.get());</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  data.<a class="code" href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml#a3369b66d9316a773a41711e3f590c041">m_Weight</a> = &weightsTensor;</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  data.<a class="code" href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml#ab3437cee6b0687812104fc1b37cbe8b3">m_Bias</a> = &biasTensor;</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  data.<a class="code" href="structarmnn_1_1_queue_descriptor_with_parameters.xhtml#aad91b9bbf7aa365d304febe79a3d1333">m_Parameters</a>.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a> = biasEnabled;</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  data.<a class="code" href="structarmnn_1_1_queue_descriptor_with_parameters.xhtml#aad91b9bbf7aa365d304febe79a3d1333">m_Parameters</a>.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#a281fcaec86e17c97f7b8402633f6b55a">m_TransposeWeightMatrix</a> = transposeWeights;</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  std::unique_ptr<armnn::IWorkload> workload = workloadFactory.<a class="code" href="classarmnn_1_1_i_workload_factory.xhtml#a1c193739520e08f686b347ff795ad2fe">CreateFullyConnected</a>(data, info);</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  <a class="code" href="struct_layer_test_result.xhtml">LayerTestResult<T, 2></a> result(outputTensorInfo);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  inputHandle->Allocate();</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  outputHandle->Allocate();</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="code" href="_tensor_copy_utils_8cpp.xhtml#ae15f1a3c55d2db87683577de9fa4437c">CopyDataToITensorHandle</a>(inputHandle.get(), &input[0][0][0][0]);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> </div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  ExecuteWorkload(*workload, memoryManager);</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  <a class="code" href="_tensor_copy_utils_8cpp.xhtml#a99b626c58a926dc7d6df78d22ec186c8">CopyDataFromITensorHandle</a>(&result.output[0][0], outputHandle.get());</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> }</div><div class="ttc" id="structarmnn_1_1_fully_connected_queue_descriptor_xhtml_a3369b66d9316a773a41711e3f590c041"><div class="ttname"><a href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml#a3369b66d9316a773a41711e3f590c041">armnn::FullyConnectedQueueDescriptor::m_Weight</a></div><div class="ttdeci">const ConstCpuTensorHandle * m_Weight</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.xhtml#l00149">WorkloadData.hpp:149</a></div></div> |
| 468 | <div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml_a281fcaec86e17c97f7b8402633f6b55a"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml#a281fcaec86e17c97f7b8402633f6b55a">armnn::FullyConnectedDescriptor::m_TransposeWeightMatrix</a></div><div class="ttdeci">bool m_TransposeWeightMatrix</div><div class="ttdoc">Enable/disable transpose weight matrix. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00388">Descriptors.hpp:388</a></div></div> |
| 469 | <div class="ttc" id="structarmnn_1_1_fully_connected_queue_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml">armnn::FullyConnectedQueueDescriptor</a></div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.xhtml#l00141">WorkloadData.hpp:141</a></div></div> |
| 470 | <div class="ttc" id="namespacearmnn_xhtml_a44affeeb090c3c6a3062830562672e84"><div class="ttname"><a href="namespacearmnn.xhtml#a44affeeb090c3c6a3062830562672e84">armnn::IgnoreUnused</a></div><div class="ttdeci">void IgnoreUnused(Ts &&...)</div><div class="ttdef"><b>Definition:</b> <a href="_ignore_unused_8hpp_source.xhtml#l00014">IgnoreUnused.hpp:14</a></div></div> |
| 471 | <div class="ttc" id="structarmnn_1_1_queue_descriptor_with_parameters_xhtml_aad91b9bbf7aa365d304febe79a3d1333"><div class="ttname"><a href="structarmnn_1_1_queue_descriptor_with_parameters.xhtml#aad91b9bbf7aa365d304febe79a3d1333">armnn::QueueDescriptorWithParameters::m_Parameters</a></div><div class="ttdeci">LayerDescriptor m_Parameters</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.xhtml#l00049">WorkloadData.hpp:49</a></div></div> |
| 472 | <div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml_aea202e14d8874cefd9a0f778022b7e25"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">armnn::FullyConnectedDescriptor::m_BiasEnabled</a></div><div class="ttdeci">bool m_BiasEnabled</div><div class="ttdoc">Enable/disable bias. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00386">Descriptors.hpp:386</a></div></div> |
| 473 | <div class="ttc" id="_tensor_copy_utils_8cpp_xhtml_afaaca8c3f3a467d124bba44067d2afa8"><div class="ttname"><a href="_tensor_copy_utils_8cpp.xhtml#afaaca8c3f3a467d124bba44067d2afa8">AllocateAndCopyDataToITensorHandle</a></div><div class="ttdeci">void AllocateAndCopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_copy_utils_8cpp_source.xhtml#l00019">TensorCopyUtils.cpp:19</a></div></div> |
| 474 | <div class="ttc" id="_tensor_copy_utils_8cpp_xhtml_a99b626c58a926dc7d6df78d22ec186c8"><div class="ttname"><a href="_tensor_copy_utils_8cpp.xhtml#a99b626c58a926dc7d6df78d22ec186c8">CopyDataFromITensorHandle</a></div><div class="ttdeci">void CopyDataFromITensorHandle(void *memory, const armnn::ITensorHandle *tensorHandle)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_copy_utils_8cpp_source.xhtml#l00014">TensorCopyUtils.cpp:14</a></div></div> |
| 475 | <div class="ttc" id="classarmnn_1_1_i_workload_factory_xhtml_a15c140be4ddceffee16436f009d3ed94"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.xhtml#a15c140be4ddceffee16436f009d3ed94">armnn::IWorkloadFactory::CreateTensorHandle</a></div><div class="ttdeci">virtual std::unique_ptr< ITensorHandle > CreateTensorHandle(const TensorInfo &tensorInfo, const bool IsMemoryManaged=true) const =0</div></div> |
| 476 | <div class="ttc" id="classarmnn_1_1_scoped_cpu_tensor_handle_xhtml"><div class="ttname"><a href="classarmnn_1_1_scoped_cpu_tensor_handle.xhtml">armnn::ScopedCpuTensorHandle</a></div><div class="ttdef"><b>Definition:</b> <a href="_cpu_tensor_handle_8hpp_source.xhtml#l00106">CpuTensorHandle.hpp:106</a></div></div> |
| 477 | <div class="ttc" id="namespacearmnn_xhtml_a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c"><div class="ttname"><a href="namespacearmnn.xhtml#a4dc0adc6737b5944e7671bee71788407acaf9b6b99962bf5c2264824231d7a40c">armnn::BoostLogSeverityMapping::info</a></div></div> |
| 478 | <div class="ttc" id="structarmnn_1_1_workload_info_xhtml"><div class="ttname"><a href="structarmnn_1_1_workload_info.xhtml">armnn::WorkloadInfo</a></div><div class="ttdoc">Contains information about inputs and outputs to a layer. </div><div class="ttdef"><b>Definition:</b> <a href="include_2armnn_2backends_2_workload_info_8hpp_source.xhtml#l00016">WorkloadInfo.hpp:16</a></div></div> |
| 479 | <div class="ttc" id="struct_layer_test_result_xhtml"><div class="ttname"><a href="struct_layer_test_result.xhtml">LayerTestResult</a></div><div class="ttdef"><b>Definition:</b> <a href="_layer_test_result_8hpp_source.xhtml#l00029">LayerTestResult.hpp:29</a></div></div> |
| 480 | <div class="ttc" id="classarmnn_1_1_i_workload_factory_xhtml_a1c193739520e08f686b347ff795ad2fe"><div class="ttname"><a href="classarmnn_1_1_i_workload_factory.xhtml#a1c193739520e08f686b347ff795ad2fe">armnn::IWorkloadFactory::CreateFullyConnected</a></div><div class="ttdeci">virtual std::unique_ptr< IWorkload > CreateFullyConnected(const FullyConnectedQueueDescriptor &descriptor, const WorkloadInfo &info) const</div><div class="ttdef"><b>Definition:</b> <a href="_workload_factory_8cpp_source.xhtml#l01225">WorkloadFactory.cpp:1225</a></div></div> |
| 481 | <div class="ttc" id="structarmnn_1_1_fully_connected_queue_descriptor_xhtml_ab3437cee6b0687812104fc1b37cbe8b3"><div class="ttname"><a href="structarmnn_1_1_fully_connected_queue_descriptor.xhtml#ab3437cee6b0687812104fc1b37cbe8b3">armnn::FullyConnectedQueueDescriptor::m_Bias</a></div><div class="ttdeci">const ConstCpuTensorHandle * m_Bias</div><div class="ttdef"><b>Definition:</b> <a href="_workload_data_8hpp_source.xhtml#l00150">WorkloadData.hpp:150</a></div></div> |
| 482 | <div class="ttc" id="_tensor_copy_utils_8cpp_xhtml_ae15f1a3c55d2db87683577de9fa4437c"><div class="ttname"><a href="_tensor_copy_utils_8cpp.xhtml#ae15f1a3c55d2db87683577de9fa4437c">CopyDataToITensorHandle</a></div><div class="ttdeci">void CopyDataToITensorHandle(armnn::ITensorHandle *tensorHandle, const void *memory)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_copy_utils_8cpp_source.xhtml#l00009">TensorCopyUtils.cpp:9</a></div></div> |
| 483 | </div><!-- fragment --> |
| 484 | </div> |
| 485 | </div> |
| 486 | </div><!-- contents --> |
| 487 | </div><!-- doc-content --> |
| 488 | <!-- start footer part --> |
| 489 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 490 | <ul> |
| 491 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_0f3cdec46afbc61a1ded8e1687c9c9a0.xhtml">backends</a></li><li class="navelem"><a class="el" href="dir_797a213d7d01b98ef12d53b0820ea64e.xhtml">backendsCommon</a></li><li class="navelem"><a class="el" href="dir_28bfe507f7e135bdae07c2a6b7f66696.xhtml">test</a></li><li class="navelem"><a class="el" href="dir_99a30439342d160875b21dac3498ad7f.xhtml">layerTests</a></li><li class="navelem"><a class="el" href="_fully_connected_test_impl_8cpp.xhtml">FullyConnectedTestImpl.cpp</a></li> |
| 492 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 493 | <a href="http://www.doxygen.org/index.html"> |
| 494 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 495 | </ul> |
| 496 | </div> |
| 497 | </body> |
| 498 | </html> |