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: GCFullyConnectedLayer Class 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.01</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_1_g_c_fully_connected_layer.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">GCFullyConnectedLayer Class Reference</div> </div>
123 <div class="contents">
125 <p>Basic function to compute a Fully Connected layer on OpenGL ES.
126 <a href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml#details">More...</a></p>
128 <p><code>#include <<a class="el" href="_g_c_fully_connected_layer_8h_source.xhtml">GCFullyConnectedLayer.h</a>></code></p>
129 <div class="dynheader">
130 Collaboration diagram for GCFullyConnectedLayer:</div>
131 <div class="dyncontent">
132 <div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1_g_c_fully_connected_layer__coll__graph.svg" width="183" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
134 <center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
135 <table class="memberdecls">
136 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
137 Public Member Functions</h2></td></tr>
138 <tr class="memitem:a72b2bdf0cae7f6e47b0d5f957de6d304"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml#a72b2bdf0cae7f6e47b0d5f957de6d304">GCFullyConnectedLayer</a> ()</td></tr>
139 <tr class="memdesc:a72b2bdf0cae7f6e47b0d5f957de6d304"><td class="mdescLeft"> </td><td class="mdescRight">Constructor. <a href="#a72b2bdf0cae7f6e47b0d5f957de6d304">More...</a><br /></td></tr>
140 <tr class="separator:a72b2bdf0cae7f6e47b0d5f957de6d304"><td class="memSeparator" colspan="2"> </td></tr>
141 <tr class="memitem:a68a5db52b1ed7f7ca1d619ac1263ab38"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml#a68a5db52b1ed7f7ca1d619ac1263ab38">configure</a> (const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *input, const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *weights, const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *biases, <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> *output, bool transpose_weights=true, bool are_weights_reshaped=false)</td></tr>
142 <tr class="memdesc:a68a5db52b1ed7f7ca1d619ac1263ab38"><td class="mdescLeft"> </td><td class="mdescRight">Set the input and output tensors. <a href="#a68a5db52b1ed7f7ca1d619ac1263ab38">More...</a><br /></td></tr>
143 <tr class="separator:a68a5db52b1ed7f7ca1d619ac1263ab38"><td class="memSeparator" colspan="2"> </td></tr>
144 <tr class="memitem:ad1717410afd0be936c6213a63c8005fb"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml#ad1717410afd0be936c6213a63c8005fb">run</a> () override</td></tr>
145 <tr class="memdesc:ad1717410afd0be936c6213a63c8005fb"><td class="mdescLeft"> </td><td class="mdescRight">Run the kernels contained in the function. <a href="#ad1717410afd0be936c6213a63c8005fb">More...</a><br /></td></tr>
146 <tr class="separator:ad1717410afd0be936c6213a63c8005fb"><td class="memSeparator" colspan="2"> </td></tr>
147 <tr class="inherit_header pub_methods_classarm__compute_1_1_i_function"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1_i_function')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarm__compute_1_1_i_function.xhtml">IFunction</a></td></tr>
148 <tr class="memitem:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1_i_function.xhtml#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">~IFunction</a> ()=default</td></tr>
149 <tr class="memdesc:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <a href="#ab921ecc3f3f6ae2b4bd61f3e1998d8c4">More...</a><br /></td></tr>
150 <tr class="separator:ab921ecc3f3f6ae2b4bd61f3e1998d8c4 inherit pub_methods_classarm__compute_1_1_i_function"><td class="memSeparator" colspan="2"> </td></tr>
152 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
153 <div class="textblock"><p>Basic function to compute a Fully Connected layer on OpenGL ES. </p>
154 <p>This function calls the following OpenGL ES kernels:</p>
156 <li><a class="el" href="classarm__compute_1_1_g_c_im2_col_kernel.xhtml">GCIm2ColKernel</a> (called when the input comes from a convolutional layer)</li>
157 <li><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer_reshape_weights.xhtml">GCFullyConnectedLayerReshapeWeights</a> (if <code>are_weights_reshaped</code> is set to false and transpose_weights is set to true ) (called once)</li>
158 <li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_multiply_kernel.xhtml">GCGEMMMatrixMultiplyKernel</a></li>
159 <li><a class="el" href="classarm__compute_1_1_g_c_g_e_m_m_matrix_accumulate_biases_kernel.xhtml">GCGEMMMatrixAccumulateBiasesKernel</a> (if <code>biases</code> is not equal to nullptr)</li>
161 <dl class="section note"><dt>Note</dt><dd>The fully connected layer accepts "weights" tensors only with 2 dimensions. </dd></dl>
163 <p>Definition at line <a class="el" href="_g_c_fully_connected_layer_8h_source.xhtml#l00062">62</a> of file <a class="el" href="_g_c_fully_connected_layer_8h_source.xhtml">GCFullyConnectedLayer.h</a>.</p>
164 </div><h2 class="groupheader">Constructor & Destructor Documentation</h2>
165 <a class="anchor" id="a72b2bdf0cae7f6e47b0d5f957de6d304"></a>
166 <div class="memitem">
167 <div class="memproto">
168 <table class="memname">
170 <td class="memname"><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml">GCFullyConnectedLayer</a> </td>
172 <td class="paramname"></td><td>)</td>
176 </div><div class="memdoc">
182 <h2 class="groupheader">Member Function Documentation</h2>
183 <a class="anchor" id="a68a5db52b1ed7f7ca1d619ac1263ab38"></a>
184 <div class="memitem">
185 <div class="memproto">
186 <table class="memname">
188 <td class="memname">void configure </td>
190 <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> * </td>
191 <td class="paramname"><em>input</em>, </td>
194 <td class="paramkey"></td>
196 <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> * </td>
197 <td class="paramname"><em>weights</em>, </td>
200 <td class="paramkey"></td>
202 <td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> * </td>
203 <td class="paramname"><em>biases</em>, </td>
206 <td class="paramkey"></td>
208 <td class="paramtype"><a class="el" href="classarm__compute_1_1_i_g_c_tensor.xhtml">IGCTensor</a> * </td>
209 <td class="paramname"><em>output</em>, </td>
212 <td class="paramkey"></td>
214 <td class="paramtype">bool </td>
215 <td class="paramname"><em>transpose_weights</em> = <code>true</code>, </td>
218 <td class="paramkey"></td>
220 <td class="paramtype">bool </td>
221 <td class="paramname"><em>are_weights_reshaped</em> = <code>false</code> </td>
229 </div><div class="memdoc">
231 <p>Set the input and output tensors. </p>
232 <dl class="params"><dt>Parameters</dt><dd>
233 <table class="params">
234 <tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Source tensor. Data type supported: F16/F32. </td></tr>
235 <tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor. The weights must be 2 dimensional. Data type supported: Same as <code>input</code> </td></tr>
236 <tr><td class="paramdir">[in]</td><td class="paramname">biases</td><td>Bias tensor. It can be nullptr. Data type supported:Same as <code>input</code>. </td></tr>
237 <tr><td class="paramdir">[out]</td><td class="paramname">output</td><td>Destination tensor. Data type supported: Same as <code>input</code>. </td></tr>
238 <tr><td class="paramdir">[in]</td><td class="paramname">transpose_weights</td><td>(Optional) Transpose weights if true. Defaults to true. </td></tr>
239 <tr><td class="paramdir">[in]</td><td class="paramname">are_weights_reshaped</td><td>(Optional) Reshape the weights tensor if false. Defaults to false. </td></tr>
246 <a class="anchor" id="ad1717410afd0be936c6213a63c8005fb"></a>
247 <div class="memitem">
248 <div class="memproto">
249 <table class="mlabels">
251 <td class="mlabels-left">
252 <table class="memname">
254 <td class="memname">void run </td>
256 <td class="paramname"></td><td>)</td>
261 <td class="mlabels-right">
262 <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
265 </div><div class="memdoc">
267 <p>Run the kernels contained in the function. </p>
268 <p>For NEON kernels:</p><ul>
269 <li>Multi-threading is used for the kernels which are parallelisable.</li>
270 <li>By default std::thread::hardware_concurrency() threads are used.</li>
272 <dl class="section note"><dt>Note</dt><dd><a class="el" href="classarm__compute_1_1_c_p_p_scheduler.xhtml#ae64eebaa07f4d2da6cc2ba538c3cb095">CPPScheduler::set_num_threads()</a> can be used to manually set the number of threads</dd></dl>
273 <p>For OpenCL kernels:</p><ul>
274 <li>All the kernels are enqueued on the queue associated with <a class="el" href="classarm__compute_1_1_c_l_scheduler.xhtml" title="Provides global access to a CL context and command queue. ">CLScheduler</a>.</li>
275 <li>The queue is then flushed.</li>
277 <dl class="section note"><dt>Note</dt><dd>The function will not block until the kernels are executed. It is the user's responsibility to wait. </dd></dl>
279 <p>Implements <a class="el" href="classarm__compute_1_1_i_function.xhtml#a18954417d3124a8095783ea13dc6d00b">IFunction</a>.</p>
283 <hr/>The documentation for this class was generated from the following file:<ul>
284 <li>arm_compute/runtime/GLES_COMPUTE/functions/<a class="el" href="_g_c_fully_connected_layer_8h_source.xhtml">GCFullyConnectedLayer.h</a></li>
286 </div><!-- contents -->
287 </div><!-- doc-content -->
288 <!-- start footer part -->
289 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
291 <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1_g_c_fully_connected_layer.xhtml">GCFullyConnectedLayer</a></li>
292 <li class="footer">Generated on Wed Jan 24 2018 14:30:45 for Compute Library by
293 <a href="http://www.doxygen.org/index.html">
294 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>