Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 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"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 7 | <meta name="generator" content="Doxygen 1.8.6"/> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| 9 | <title>Compute Library: src/core/CL/cl_kernels/batchnormalization_layer.cl File 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> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | $(window).load(resizeHeight); |
| 19 | </script> |
| 20 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <script type="text/javascript"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 23 | $(document).ready(function() { searchBox.OnSelectItem(0); }); |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 24 | </script> |
| 25 | <script type="text/x-mathjax-config"> |
| 26 | MathJax.Hub.Config({ |
| 27 | extensions: ["tex2jax.js"], |
| 28 | jax: ["input/TeX","output/HTML-CSS"], |
| 29 | }); |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 30 | </script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 31 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 32 | </head> |
| 33 | <body> |
| 34 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 35 | <div id="titlearea"> |
| 36 | <table cellspacing="0" cellpadding="0"> |
| 37 | <tbody> |
| 38 | <tr style="height: 56px;"> |
| 39 | <td style="padding-left: 0.5em;"> |
| 40 | <div id="projectname">Compute Library |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 41 |  <span id="projectnumber">17.10</span> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 42 | </div> |
| 43 | </td> |
| 44 | </tr> |
| 45 | </tbody> |
| 46 | </table> |
| 47 | </div> |
| 48 | <!-- end header part --> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 49 | <!-- Generated by Doxygen 1.8.6 --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 50 | <script type="text/javascript"> |
| 51 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 52 | </script> |
| 53 | <div id="navrow1" class="tabs"> |
| 54 | <ul class="tablist"> |
| 55 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
| 56 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
| 57 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 58 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 59 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 60 | <li> |
| 61 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 62 | <span class="left"> |
| 63 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 64 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 65 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 66 | alt=""/> |
| 67 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 68 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 69 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 70 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 71 | </span><span class="right"> |
| 72 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 73 | </span> |
| 74 | </div> |
| 75 | </li> |
| 76 | </ul> |
| 77 | </div> |
| 78 | <div id="navrow2" class="tabs2"> |
| 79 | <ul class="tablist"> |
| 80 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 81 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 82 | </ul> |
| 83 | </div> |
| 84 | </div><!-- top --> |
| 85 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 86 | <div id="nav-tree"> |
| 87 | <div id="nav-tree-contents"> |
| 88 | <div id="nav-sync" class="sync"></div> |
| 89 | </div> |
| 90 | </div> |
| 91 | <div id="splitbar" style="-moz-user-select:none;" |
| 92 | class="ui-resizable-handle"> |
| 93 | </div> |
| 94 | </div> |
| 95 | <script type="text/javascript"> |
| 96 | $(document).ready(function(){initNavTree('batchnormalization__layer_8cl.xhtml','');}); |
| 97 | </script> |
| 98 | <div id="doc-content"> |
| 99 | <!-- window showing the filter options --> |
| 100 | <div id="MSearchSelectWindow" |
| 101 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 102 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 103 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 104 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></div> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 105 | |
| 106 | <!-- iframe showing the search results (closed by default) --> |
| 107 | <div id="MSearchResultsWindow"> |
| 108 | <iframe src="javascript:void(0)" frameborder="0" |
| 109 | name="MSearchResults" id="MSearchResults"> |
| 110 | </iframe> |
| 111 | </div> |
| 112 | |
| 113 | <div class="header"> |
| 114 | <div class="summary"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 115 | <a href="#define-members">Macros</a> | |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 116 | <a href="#func-members">Functions</a> </div> |
| 117 | <div class="headertitle"> |
| 118 | <div class="title">batchnormalization_layer.cl File Reference</div> </div> |
| 119 | </div><!--header--> |
| 120 | <div class="contents"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 121 | <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br/> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 122 | </div> |
| 123 | <p><a href="batchnormalization__layer_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| 124 | <table class="memberdecls"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 125 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 126 | Macros</h2></td></tr> |
| 127 | <tr class="memitem:aebbeb1f22eca3a3f4c3e019e8f419f39"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#aebbeb1f22eca3a3f4c3e019e8f419f39">ADD_OP</a>(a, b)   ((a) + (b))</td></tr> |
| 128 | <tr class="separator:aebbeb1f22eca3a3f4c3e019e8f419f39"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <tr class="memitem:ad778425e4131c4731f17d7e6e3499a07"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#ad778425e4131c4731f17d7e6e3499a07">SUB_OP</a>(a, b)   ((a) - (b))</td></tr> |
| 130 | <tr class="separator:ad778425e4131c4731f17d7e6e3499a07"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <tr class="memitem:ad3cc858846806e6b1d3694b9d0a2e6da"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#ad3cc858846806e6b1d3694b9d0a2e6da">MUL_OP</a>(a, b)   ((a) * (b))</td></tr> |
| 132 | <tr class="separator:ad3cc858846806e6b1d3694b9d0a2e6da"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <tr class="memitem:acbe0869c7899bc8d9f0e91a6249fa970"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#acbe0869c7899bc8d9f0e91a6249fa970">INVSQRT_OP</a>(a)   rsqrt((a))</td></tr> |
| 134 | <tr class="separator:acbe0869c7899bc8d9f0e91a6249fa970"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | <tr class="memitem:a107d847044e677b01e9bd3d5251b39d9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#a107d847044e677b01e9bd3d5251b39d9">SQCVT_SAT</a>(a)   (a)</td></tr> |
| 136 | <tr class="separator:a107d847044e677b01e9bd3d5251b39d9"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | </table><table class="memberdecls"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 138 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 139 | Functions</h2></td></tr> |
| 140 | <tr class="memitem:a38320a1607c05acba75c51c0fb3aec38"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="batchnormalization__layer_8cl.xhtml#a38320a1607c05acba75c51c0fb3aec38">batchnormalization_layer</a> (__global uchar *input_ptr, uint input_stride_x, uint input_step_x, uint input_stride_y, uint input_step_y, uint input_stride_z, uint input_step_z, uint input_offset_first_element_in_bytes, __global uchar *output_ptr, uint output_stride_x, uint output_step_x, uint output_stride_y, uint output_step_y, uint output_stride_z, uint output_step_z, uint output_offset_first_element_in_bytes, __global uchar *mean_ptr, uint mean_stride_x, uint mean_step_x, uint mean_offset_first_element_in_bytes, __global uchar *var_ptr, uint var_stride_x, uint var_step_x, uint var_offset_first_element_in_bytes, __global uchar *beta_ptr, uint beta_stride_x, uint beta_step_x, uint beta_offset_first_element_in_bytes, __global uchar *gamma_ptr, uint gamma_stride_x, uint gamma_step_x, uint gamma_offset_first_element_in_bytes, float epsilon)</td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 141 | <tr class="memdesc:a38320a1607c05acba75c51c0fb3aec38"><td class="mdescLeft"> </td><td class="mdescRight">Apply batch normalization. <a href="#a38320a1607c05acba75c51c0fb3aec38">More...</a><br/></td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 142 | <tr class="separator:a38320a1607c05acba75c51c0fb3aec38"><td class="memSeparator" colspan="2"> </td></tr> |
| 143 | </table> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 144 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 145 | <a class="anchor" id="aebbeb1f22eca3a3f4c3e019e8f419f39"></a> |
| 146 | <div class="memitem"> |
| 147 | <div class="memproto"> |
| 148 | <table class="memname"> |
| 149 | <tr> |
| 150 | <td class="memname">#define ADD_OP</td> |
| 151 | <td>(</td> |
| 152 | <td class="paramtype"> </td> |
| 153 | <td class="paramname">a, </td> |
| 154 | </tr> |
| 155 | <tr> |
| 156 | <td class="paramkey"></td> |
| 157 | <td></td> |
| 158 | <td class="paramtype"> </td> |
| 159 | <td class="paramname">b </td> |
| 160 | </tr> |
| 161 | <tr> |
| 162 | <td></td> |
| 163 | <td>)</td> |
| 164 | <td></td><td>   ((a) + (b))</td> |
| 165 | </tr> |
| 166 | </table> |
| 167 | </div><div class="memdoc"> |
| 168 | |
| 169 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00037">37</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
| 170 | |
| 171 | <p>Referenced by <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>.</p> |
| 172 | |
| 173 | </div> |
| 174 | </div> |
| 175 | <a class="anchor" id="acbe0869c7899bc8d9f0e91a6249fa970"></a> |
| 176 | <div class="memitem"> |
| 177 | <div class="memproto"> |
| 178 | <table class="memname"> |
| 179 | <tr> |
| 180 | <td class="memname">#define INVSQRT_OP</td> |
| 181 | <td>(</td> |
| 182 | <td class="paramtype"> </td> |
| 183 | <td class="paramname">a</td><td>)</td> |
| 184 | <td>   rsqrt((a))</td> |
| 185 | </tr> |
| 186 | </table> |
| 187 | </div><div class="memdoc"> |
| 188 | |
| 189 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00040">40</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
| 190 | |
| 191 | <p>Referenced by <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>.</p> |
| 192 | |
| 193 | </div> |
| 194 | </div> |
| 195 | <a class="anchor" id="ad3cc858846806e6b1d3694b9d0a2e6da"></a> |
| 196 | <div class="memitem"> |
| 197 | <div class="memproto"> |
| 198 | <table class="memname"> |
| 199 | <tr> |
| 200 | <td class="memname">#define MUL_OP</td> |
| 201 | <td>(</td> |
| 202 | <td class="paramtype"> </td> |
| 203 | <td class="paramname">a, </td> |
| 204 | </tr> |
| 205 | <tr> |
| 206 | <td class="paramkey"></td> |
| 207 | <td></td> |
| 208 | <td class="paramtype"> </td> |
| 209 | <td class="paramname">b </td> |
| 210 | </tr> |
| 211 | <tr> |
| 212 | <td></td> |
| 213 | <td>)</td> |
| 214 | <td></td><td>   ((a) * (b))</td> |
| 215 | </tr> |
| 216 | </table> |
| 217 | </div><div class="memdoc"> |
| 218 | |
| 219 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00039">39</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
| 220 | |
| 221 | <p>Referenced by <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>.</p> |
| 222 | |
| 223 | </div> |
| 224 | </div> |
| 225 | <a class="anchor" id="a107d847044e677b01e9bd3d5251b39d9"></a> |
| 226 | <div class="memitem"> |
| 227 | <div class="memproto"> |
| 228 | <table class="memname"> |
| 229 | <tr> |
| 230 | <td class="memname">#define SQCVT_SAT</td> |
| 231 | <td>(</td> |
| 232 | <td class="paramtype"> </td> |
| 233 | <td class="paramname">a</td><td>)</td> |
| 234 | <td>   (a)</td> |
| 235 | </tr> |
| 236 | </table> |
| 237 | </div><div class="memdoc"> |
| 238 | |
| 239 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00041">41</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
| 240 | |
| 241 | <p>Referenced by <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>.</p> |
| 242 | |
| 243 | </div> |
| 244 | </div> |
| 245 | <a class="anchor" id="ad778425e4131c4731f17d7e6e3499a07"></a> |
| 246 | <div class="memitem"> |
| 247 | <div class="memproto"> |
| 248 | <table class="memname"> |
| 249 | <tr> |
| 250 | <td class="memname">#define SUB_OP</td> |
| 251 | <td>(</td> |
| 252 | <td class="paramtype"> </td> |
| 253 | <td class="paramname">a, </td> |
| 254 | </tr> |
| 255 | <tr> |
| 256 | <td class="paramkey"></td> |
| 257 | <td></td> |
| 258 | <td class="paramtype"> </td> |
| 259 | <td class="paramname">b </td> |
| 260 | </tr> |
| 261 | <tr> |
| 262 | <td></td> |
| 263 | <td>)</td> |
| 264 | <td></td><td>   ((a) - (b))</td> |
| 265 | </tr> |
| 266 | </table> |
| 267 | </div><div class="memdoc"> |
| 268 | |
| 269 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00038">38</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
| 270 | |
| 271 | <p>Referenced by <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">batchnormalization_layer()</a>.</p> |
| 272 | |
| 273 | </div> |
| 274 | </div> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 275 | <h2 class="groupheader">Function Documentation</h2> |
| 276 | <a class="anchor" id="a38320a1607c05acba75c51c0fb3aec38"></a> |
| 277 | <div class="memitem"> |
| 278 | <div class="memproto"> |
| 279 | <table class="memname"> |
| 280 | <tr> |
| 281 | <td class="memname">__kernel void batchnormalization_layer </td> |
| 282 | <td>(</td> |
| 283 | <td class="paramtype">__global uchar * </td> |
| 284 | <td class="paramname"><em>input_ptr</em>, </td> |
| 285 | </tr> |
| 286 | <tr> |
| 287 | <td class="paramkey"></td> |
| 288 | <td></td> |
| 289 | <td class="paramtype">uint </td> |
| 290 | <td class="paramname"><em>input_stride_x</em>, </td> |
| 291 | </tr> |
| 292 | <tr> |
| 293 | <td class="paramkey"></td> |
| 294 | <td></td> |
| 295 | <td class="paramtype">uint </td> |
| 296 | <td class="paramname"><em>input_step_x</em>, </td> |
| 297 | </tr> |
| 298 | <tr> |
| 299 | <td class="paramkey"></td> |
| 300 | <td></td> |
| 301 | <td class="paramtype">uint </td> |
| 302 | <td class="paramname"><em>input_stride_y</em>, </td> |
| 303 | </tr> |
| 304 | <tr> |
| 305 | <td class="paramkey"></td> |
| 306 | <td></td> |
| 307 | <td class="paramtype">uint </td> |
| 308 | <td class="paramname"><em>input_step_y</em>, </td> |
| 309 | </tr> |
| 310 | <tr> |
| 311 | <td class="paramkey"></td> |
| 312 | <td></td> |
| 313 | <td class="paramtype">uint </td> |
| 314 | <td class="paramname"><em>input_stride_z</em>, </td> |
| 315 | </tr> |
| 316 | <tr> |
| 317 | <td class="paramkey"></td> |
| 318 | <td></td> |
| 319 | <td class="paramtype">uint </td> |
| 320 | <td class="paramname"><em>input_step_z</em>, </td> |
| 321 | </tr> |
| 322 | <tr> |
| 323 | <td class="paramkey"></td> |
| 324 | <td></td> |
| 325 | <td class="paramtype">uint </td> |
| 326 | <td class="paramname"><em>input_offset_first_element_in_bytes</em>, </td> |
| 327 | </tr> |
| 328 | <tr> |
| 329 | <td class="paramkey"></td> |
| 330 | <td></td> |
| 331 | <td class="paramtype">__global uchar * </td> |
| 332 | <td class="paramname"><em>output_ptr</em>, </td> |
| 333 | </tr> |
| 334 | <tr> |
| 335 | <td class="paramkey"></td> |
| 336 | <td></td> |
| 337 | <td class="paramtype">uint </td> |
| 338 | <td class="paramname"><em>output_stride_x</em>, </td> |
| 339 | </tr> |
| 340 | <tr> |
| 341 | <td class="paramkey"></td> |
| 342 | <td></td> |
| 343 | <td class="paramtype">uint </td> |
| 344 | <td class="paramname"><em>output_step_x</em>, </td> |
| 345 | </tr> |
| 346 | <tr> |
| 347 | <td class="paramkey"></td> |
| 348 | <td></td> |
| 349 | <td class="paramtype">uint </td> |
| 350 | <td class="paramname"><em>output_stride_y</em>, </td> |
| 351 | </tr> |
| 352 | <tr> |
| 353 | <td class="paramkey"></td> |
| 354 | <td></td> |
| 355 | <td class="paramtype">uint </td> |
| 356 | <td class="paramname"><em>output_step_y</em>, </td> |
| 357 | </tr> |
| 358 | <tr> |
| 359 | <td class="paramkey"></td> |
| 360 | <td></td> |
| 361 | <td class="paramtype">uint </td> |
| 362 | <td class="paramname"><em>output_stride_z</em>, </td> |
| 363 | </tr> |
| 364 | <tr> |
| 365 | <td class="paramkey"></td> |
| 366 | <td></td> |
| 367 | <td class="paramtype">uint </td> |
| 368 | <td class="paramname"><em>output_step_z</em>, </td> |
| 369 | </tr> |
| 370 | <tr> |
| 371 | <td class="paramkey"></td> |
| 372 | <td></td> |
| 373 | <td class="paramtype">uint </td> |
| 374 | <td class="paramname"><em>output_offset_first_element_in_bytes</em>, </td> |
| 375 | </tr> |
| 376 | <tr> |
| 377 | <td class="paramkey"></td> |
| 378 | <td></td> |
| 379 | <td class="paramtype">__global uchar * </td> |
| 380 | <td class="paramname"><em>mean_ptr</em>, </td> |
| 381 | </tr> |
| 382 | <tr> |
| 383 | <td class="paramkey"></td> |
| 384 | <td></td> |
| 385 | <td class="paramtype">uint </td> |
| 386 | <td class="paramname"><em>mean_stride_x</em>, </td> |
| 387 | </tr> |
| 388 | <tr> |
| 389 | <td class="paramkey"></td> |
| 390 | <td></td> |
| 391 | <td class="paramtype">uint </td> |
| 392 | <td class="paramname"><em>mean_step_x</em>, </td> |
| 393 | </tr> |
| 394 | <tr> |
| 395 | <td class="paramkey"></td> |
| 396 | <td></td> |
| 397 | <td class="paramtype">uint </td> |
| 398 | <td class="paramname"><em>mean_offset_first_element_in_bytes</em>, </td> |
| 399 | </tr> |
| 400 | <tr> |
| 401 | <td class="paramkey"></td> |
| 402 | <td></td> |
| 403 | <td class="paramtype">__global uchar * </td> |
| 404 | <td class="paramname"><em>var_ptr</em>, </td> |
| 405 | </tr> |
| 406 | <tr> |
| 407 | <td class="paramkey"></td> |
| 408 | <td></td> |
| 409 | <td class="paramtype">uint </td> |
| 410 | <td class="paramname"><em>var_stride_x</em>, </td> |
| 411 | </tr> |
| 412 | <tr> |
| 413 | <td class="paramkey"></td> |
| 414 | <td></td> |
| 415 | <td class="paramtype">uint </td> |
| 416 | <td class="paramname"><em>var_step_x</em>, </td> |
| 417 | </tr> |
| 418 | <tr> |
| 419 | <td class="paramkey"></td> |
| 420 | <td></td> |
| 421 | <td class="paramtype">uint </td> |
| 422 | <td class="paramname"><em>var_offset_first_element_in_bytes</em>, </td> |
| 423 | </tr> |
| 424 | <tr> |
| 425 | <td class="paramkey"></td> |
| 426 | <td></td> |
| 427 | <td class="paramtype">__global uchar * </td> |
| 428 | <td class="paramname"><em>beta_ptr</em>, </td> |
| 429 | </tr> |
| 430 | <tr> |
| 431 | <td class="paramkey"></td> |
| 432 | <td></td> |
| 433 | <td class="paramtype">uint </td> |
| 434 | <td class="paramname"><em>beta_stride_x</em>, </td> |
| 435 | </tr> |
| 436 | <tr> |
| 437 | <td class="paramkey"></td> |
| 438 | <td></td> |
| 439 | <td class="paramtype">uint </td> |
| 440 | <td class="paramname"><em>beta_step_x</em>, </td> |
| 441 | </tr> |
| 442 | <tr> |
| 443 | <td class="paramkey"></td> |
| 444 | <td></td> |
| 445 | <td class="paramtype">uint </td> |
| 446 | <td class="paramname"><em>beta_offset_first_element_in_bytes</em>, </td> |
| 447 | </tr> |
| 448 | <tr> |
| 449 | <td class="paramkey"></td> |
| 450 | <td></td> |
| 451 | <td class="paramtype">__global uchar * </td> |
| 452 | <td class="paramname"><em>gamma_ptr</em>, </td> |
| 453 | </tr> |
| 454 | <tr> |
| 455 | <td class="paramkey"></td> |
| 456 | <td></td> |
| 457 | <td class="paramtype">uint </td> |
| 458 | <td class="paramname"><em>gamma_stride_x</em>, </td> |
| 459 | </tr> |
| 460 | <tr> |
| 461 | <td class="paramkey"></td> |
| 462 | <td></td> |
| 463 | <td class="paramtype">uint </td> |
| 464 | <td class="paramname"><em>gamma_step_x</em>, </td> |
| 465 | </tr> |
| 466 | <tr> |
| 467 | <td class="paramkey"></td> |
| 468 | <td></td> |
| 469 | <td class="paramtype">uint </td> |
| 470 | <td class="paramname"><em>gamma_offset_first_element_in_bytes</em>, </td> |
| 471 | </tr> |
| 472 | <tr> |
| 473 | <td class="paramkey"></td> |
| 474 | <td></td> |
| 475 | <td class="paramtype">float </td> |
| 476 | <td class="paramname"><em>epsilon</em> </td> |
| 477 | </tr> |
| 478 | <tr> |
| 479 | <td></td> |
| 480 | <td>)</td> |
| 481 | <td></td><td></td> |
| 482 | </tr> |
| 483 | </table> |
| 484 | </div><div class="memdoc"> |
| 485 | |
| 486 | <p>Apply batch normalization. </p> |
| 487 | <dl class="params"><dt>Parameters</dt><dd> |
| 488 | <table class="params"> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 489 | <tr><td class="paramdir">[in]</td><td class="paramname">input_ptr</td><td>Pointer to the first source tensor. Supported data types: QS8/QS16/F16/F32 </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 490 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_x</td><td>Stride of the first source tensor in X dimension (in bytes) </td></tr> |
| 491 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_x</td><td>input_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 492 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_y</td><td>Stride of the first source tensor in Y dimension (in bytes) </td></tr> |
| 493 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_y</td><td>input_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr> |
| 494 | <tr><td class="paramdir">[in]</td><td class="paramname">input_stride_z</td><td>Stride of the first source tensor in Z dimension (in bytes) </td></tr> |
| 495 | <tr><td class="paramdir">[in]</td><td class="paramname">input_step_z</td><td>input_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr> |
| 496 | <tr><td class="paramdir">[in]</td><td class="paramname">input_offset_first_element_in_bytes</td><td>The offset of the first element in the first source tensor </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 497 | <tr><td class="paramdir">[out]</td><td class="paramname">output_ptr</td><td>Pointer to the destination tensor. Supported data types: same as <code>input_ptr</code> </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 498 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_x</td><td>Stride of the destination tensor in X dimension (in bytes) </td></tr> |
| 499 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_x</td><td>output_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 500 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_y</td><td>Stride of the destination tensor in Y dimension (in bytes) </td></tr> |
| 501 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_y</td><td>output_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr> |
| 502 | <tr><td class="paramdir">[in]</td><td class="paramname">output_stride_z</td><td>Stride of the destination tensor in Z dimension (in bytes) </td></tr> |
| 503 | <tr><td class="paramdir">[in]</td><td class="paramname">output_step_z</td><td>output_stride_z * number of elements along Z processed per workitem(in bytes) </td></tr> |
| 504 | <tr><td class="paramdir">[in]</td><td class="paramname">output_offset_first_element_in_bytes</td><td>The offset of the first element in the destination tensor </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 505 | <tr><td class="paramdir">[in]</td><td class="paramname">mean_ptr</td><td>Pointer to the mean source tensor. Supported data types: same as <code>input_ptr</code> </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 506 | <tr><td class="paramdir">[in]</td><td class="paramname">mean_stride_x</td><td>Stride of the mean source tensor in X dimension (in bytes) </td></tr> |
| 507 | <tr><td class="paramdir">[in]</td><td class="paramname">mean_step_x</td><td>mean_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 508 | <tr><td class="paramdir">[in]</td><td class="paramname">mean_offset_first_element_in_bytes</td><td>The offset of the first element in the mean source tensor </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 509 | <tr><td class="paramdir">[in]</td><td class="paramname">var_ptr</td><td>Pointer to the var tensor. Supported data types: same as <code>input_ptr</code> </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 510 | <tr><td class="paramdir">[in]</td><td class="paramname">var_stride_x</td><td>Stride of the var tensor in X dimension (in bytes) </td></tr> |
| 511 | <tr><td class="paramdir">[in]</td><td class="paramname">var_step_x</td><td>var_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 512 | <tr><td class="paramdir">[in]</td><td class="paramname">var_offset_first_element_in_bytes</td><td>The offset of the first element in the var source tensor </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 513 | <tr><td class="paramdir">[in]</td><td class="paramname">beta_ptr</td><td>Pointer to the beta source tensor. Supported data types: same as <code>input_ptr</code> </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 514 | <tr><td class="paramdir">[in]</td><td class="paramname">beta_stride_x</td><td>Stride of the beta source tensor in X dimension (in bytes) </td></tr> |
| 515 | <tr><td class="paramdir">[in]</td><td class="paramname">beta_step_x</td><td>beta_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 516 | <tr><td class="paramdir">[in]</td><td class="paramname">beta_offset_first_element_in_bytes</td><td>The offset of the first element in the beta source tensor </td></tr> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 517 | <tr><td class="paramdir">[in]</td><td class="paramname">gamma_ptr</td><td>Pointer to the gamma source tensor. Supported data types: same as <code>input_ptr</code> </td></tr> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 518 | <tr><td class="paramdir">[in]</td><td class="paramname">gamma_stride_x</td><td>Stride of the gamma source tensor in X dimension (in bytes) </td></tr> |
| 519 | <tr><td class="paramdir">[in]</td><td class="paramname">gamma_step_x</td><td>gamma_stride_x * number of elements along X processed per workitem(in bytes) </td></tr> |
| 520 | <tr><td class="paramdir">[in]</td><td class="paramname">gamma_offset_first_element_in_bytes</td><td>The offset of the first element in the gamma source tensor </td></tr> |
| 521 | <tr><td class="paramdir">[in]</td><td class="paramname">epsilon</td><td>Epsilon parameter in the batch normalization equation </td></tr> |
| 522 | </table> |
| 523 | </dd> |
| 524 | </dl> |
| 525 | |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 526 | <p>Definition at line <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00081">81</a> of file <a class="el" href="batchnormalization__layer_8cl_source.xhtml">batchnormalization_layer.cl</a>.</p> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 527 | |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 528 | <p>References <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00037">ADD_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00111">CONVERT_TO_TENSOR3D_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00090">CONVERT_TO_VECTOR_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00040">INVSQRT_OP</a>, <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00039">MUL_OP</a>, <a class="el" href="helpers_8h_source.xhtml#l00128">Vector::ptr</a>, <a class="el" href="helpers_8h_source.xhtml#l00145">Tensor3D::ptr</a>, <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00041">SQCVT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00130">Vector::stride_x</a>, <a class="el" href="batchnormalization__layer_8cl_source.xhtml#l00038">SUB_OP</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00037">VLOAD</a>, and <a class="el" href="helpers_8h_source.xhtml#l00040">VSTORE</a>.</p> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 529 | <div class="fragment"><div class="line"><a name="l00090"></a><span class="lineno"> 90</span> {</div> |
| 530 | <div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> in = <a class="code" href="helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(input);</div> |
| 531 | <div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="preprocessor">#ifdef IN_PLACE</span></div> |
| 532 | <div class="line"><a name="l00093"></a><span class="lineno"> 93</span> <span class="preprocessor"></span> <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> out = in;</div> |
| 533 | <div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="preprocessor">#else </span><span class="comment">/* IN_PLACE */</span><span class="preprocessor"></span></div> |
| 534 | <div class="line"><a name="l00095"></a><span class="lineno"> 95</span> <span class="preprocessor"></span> <a class="code" href="struct_tensor3_d.xhtml">Tensor3D</a> out = <a class="code" href="helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a>(output);</div> |
| 535 | <div class="line"><a name="l00096"></a><span class="lineno"> 96</span> <span class="preprocessor">#endif </span><span class="comment">/* IN_PLACE */</span><span class="preprocessor"></span></div> |
| 536 | <div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="preprocessor"></span> <a class="code" href="struct_vector.xhtml">Vector</a> mean = <a class="code" href="helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(mean);</div> |
| 537 | <div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <a class="code" href="struct_vector.xhtml">Vector</a> var = <a class="code" href="helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(var);</div> |
| 538 | <div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <a class="code" href="struct_vector.xhtml">Vector</a> beta = <a class="code" href="helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(beta);</div> |
| 539 | <div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <a class="code" href="struct_vector.xhtml">Vector</a> gamma = <a class="code" href="helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a>(gamma);</div> |
| 540 | <div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div> |
| 541 | <div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE)</div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 542 | <div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  data = 0;</div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 543 | <div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, VEC_SIZE)</div> |
| 544 | <div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  denominator = 0;</div> |
| 545 | <div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div> |
| 546 | <div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  numerator = 0;</div> |
| 547 | <div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div> |
| 548 | <div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  x_bar = 0;</div> |
| 549 | <div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div> |
| 550 | <div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  gamma_vec = 0;</div> |
| 551 | <div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE)</div> |
| 552 | <div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  beta_vec = 0;</div> |
| 553 | <div class="line"><a name="l00114"></a><span class="lineno"> 114</span> </div> |
| 554 | <div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  const <span class="keywordtype">int</span> current_slice = get_global_id(2);</div> |
| 555 | <div class="line"><a name="l00116"></a><span class="lineno"> 116</span> </div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 556 | <div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  data = <a class="code" href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a>(VEC_SIZE)(0, (__global DATA_TYPE *)in.ptr);</div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 557 | <div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  denominator = *((__global DATA_TYPE *)(var.ptr + current_slice * var.stride_x));</div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 558 | <div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  denominator = <a class="code" href="batchnormalization__layer_8cl.xhtml#acbe0869c7899bc8d9f0e91a6249fa970">INVSQRT_OP</a>(<a class="code" href="batchnormalization__layer_8cl.xhtml#aebbeb1f22eca3a3f4c3e019e8f419f39">ADD_OP</a>(denominator, ((<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, VEC_SIZE))<a class="code" href="batchnormalization__layer_8cl.xhtml#a107d847044e677b01e9bd3d5251b39d9">SQCVT_SAT</a>(epsilon))));</div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 559 | <div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div> |
| 560 | <div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <span class="comment">// Calculate x bar and store results</span></div> |
| 561 | <div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  numerator = *((__global DATA_TYPE *)(mean.ptr + current_slice * mean.stride_x));</div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 562 | <div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  numerator = <a class="code" href="batchnormalization__layer_8cl.xhtml#ad778425e4131c4731f17d7e6e3499a07">SUB_OP</a>(data, numerator);</div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 563 | <div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  x_bar = <a class="code" href="batchnormalization__layer_8cl.xhtml#ad3cc858846806e6b1d3694b9d0a2e6da">MUL_OP</a>(numerator, denominator);</div> |
| 564 | <div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div> |
| 565 | <div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  gamma_vec = *((__global DATA_TYPE *)(gamma.ptr + current_slice * beta.stride_x));</div> |
| 566 | <div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  beta_vec = *((__global DATA_TYPE *)(beta.ptr + current_slice * beta.stride_x));</div> |
| 567 | <div class="line"><a name="l00128"></a><span class="lineno"> 128</span> </div> |
| 568 | <div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  <a class="code" href="helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a>(VEC_SIZE)</div> |
| 569 | <div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  (<a class="code" href="batchnormalization__layer_8cl.xhtml#aebbeb1f22eca3a3f4c3e019e8f419f39">ADD_OP</a>(<a class="code" href="batchnormalization__layer_8cl.xhtml#ad3cc858846806e6b1d3694b9d0a2e6da">MUL_OP</a>(gamma_vec, x_bar), beta_vec), 0, (__global DATA_TYPE *)out.ptr);</div> |
| 570 | <div class="line"><a name="l00131"></a><span class="lineno"> 131</span> }</div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 571 | <div class="ttc" id="struct_vector_xhtml"><div class="ttname"><a href="struct_vector.xhtml">Vector</a></div><div class="ttdoc">Structure to hold Vector information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00126">helpers.h:126</a></div></div> |
| 572 | <div class="ttc" id="helpers_8h_xhtml_a287e2fc366c312b468382c95bb90f91f"><div class="ttname"><a href="helpers_8h.xhtml#a287e2fc366c312b468382c95bb90f91f">VLOAD</a></div><div class="ttdeci">#define VLOAD(size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00037">helpers.h:37</a></div></div> |
| 573 | <div class="ttc" id="helpers_8h_xhtml_a31c8c760f08fb1a331b16b7c204321dc"><div class="ttname"><a href="helpers_8h.xhtml#a31c8c760f08fb1a331b16b7c204321dc">CONVERT_TO_TENSOR3D_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_TENSOR3D_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00111">helpers.h:111</a></div></div> |
| 574 | <div class="ttc" id="helpers_8h_xhtml_a527bfdf5eeb306f1cf01c4a8e29f38e0"><div class="ttname"><a href="helpers_8h.xhtml#a527bfdf5eeb306f1cf01c4a8e29f38e0">CONVERT_TO_VECTOR_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_VECTOR_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00090">helpers.h:90</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 575 | <div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div> |
| 576 | <div class="ttc" id="batchnormalization__layer_8cl_xhtml_ad778425e4131c4731f17d7e6e3499a07"><div class="ttname"><a href="batchnormalization__layer_8cl.xhtml#ad778425e4131c4731f17d7e6e3499a07">SUB_OP</a></div><div class="ttdeci">#define SUB_OP(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="batchnormalization__layer_8cl_source.xhtml#l00038">batchnormalization_layer.cl:38</a></div></div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 577 | <div class="ttc" id="struct_tensor3_d_xhtml"><div class="ttname"><a href="struct_tensor3_d.xhtml">Tensor3D</a></div><div class="ttdoc">Structure to hold 3D tensor information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00143">helpers.h:143</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 578 | <div class="ttc" id="batchnormalization__layer_8cl_xhtml_acbe0869c7899bc8d9f0e91a6249fa970"><div class="ttname"><a href="batchnormalization__layer_8cl.xhtml#acbe0869c7899bc8d9f0e91a6249fa970">INVSQRT_OP</a></div><div class="ttdeci">#define INVSQRT_OP(a)</div><div class="ttdef"><b>Definition:</b> <a href="batchnormalization__layer_8cl_source.xhtml#l00040">batchnormalization_layer.cl:40</a></div></div> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 579 | <div class="ttc" id="helpers_8h_xhtml_acb282042d1edeeaa3cc979a206f78b54"><div class="ttname"><a href="helpers_8h.xhtml#acb282042d1edeeaa3cc979a206f78b54">VSTORE</a></div><div class="ttdeci">#define VSTORE(size)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00040">helpers.h:40</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 580 | <div class="ttc" id="batchnormalization__layer_8cl_xhtml_ad3cc858846806e6b1d3694b9d0a2e6da"><div class="ttname"><a href="batchnormalization__layer_8cl.xhtml#ad3cc858846806e6b1d3694b9d0a2e6da">MUL_OP</a></div><div class="ttdeci">#define MUL_OP(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="batchnormalization__layer_8cl_source.xhtml#l00039">batchnormalization_layer.cl:39</a></div></div> |
| 581 | <div class="ttc" id="batchnormalization__layer_8cl_xhtml_aebbeb1f22eca3a3f4c3e019e8f419f39"><div class="ttname"><a href="batchnormalization__layer_8cl.xhtml#aebbeb1f22eca3a3f4c3e019e8f419f39">ADD_OP</a></div><div class="ttdeci">#define ADD_OP(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="batchnormalization__layer_8cl_source.xhtml#l00037">batchnormalization_layer.cl:37</a></div></div> |
| 582 | <div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div> |
| 583 | <div class="ttc" id="batchnormalization__layer_8cl_xhtml_a107d847044e677b01e9bd3d5251b39d9"><div class="ttname"><a href="batchnormalization__layer_8cl.xhtml#a107d847044e677b01e9bd3d5251b39d9">SQCVT_SAT</a></div><div class="ttdeci">#define SQCVT_SAT(a)</div><div class="ttdef"><b>Definition:</b> <a href="batchnormalization__layer_8cl_source.xhtml#l00041">batchnormalization_layer.cl:41</a></div></div> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 584 | </div><!-- fragment --> |
| 585 | </div> |
| 586 | </div> |
| 587 | </div><!-- contents --> |
| 588 | </div><!-- doc-content --> |
| 589 | <!-- start footer part --> |
| 590 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 591 | <ul> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 592 | <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="batchnormalization__layer_8cl.xhtml">batchnormalization_layer.cl</a></li> |
Kaizen | bf8b01d | 2017-10-12 14:26:51 +0100 | [diff] [blame^] | 593 | <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 594 | <a href="http://www.doxygen.org/index.html"> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 595 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 596 | </ul> |
| 597 | </div> |
| 598 | </body> |
| 599 | </html> |