blob: e6dc73843545581f4d6e2b43beb91f2b8d5f9c73 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: tests/validation/reference/DeconvolutionLayer.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">Compute Library
&#160;<span id="projectnumber">18.08</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
<li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
<li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
<li class="current"><a href="files.xhtml"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.xhtml"><span>File&#160;List</span></a></li>
<li><a href="globals.xhtml"><span>Globals</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('reference_2_deconvolution_layer_8cpp_source.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="headertitle">
<div class="title">DeconvolutionLayer.cpp</div> </div>
</div><!--header-->
<div class="contents">
<a href="reference_2_deconvolution_layer_8cpp.xhtml">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> * Copyright (c) 2017-2018 ARM Limited.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * SPDX-License-Identifier: MIT</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Permission is hereby granted, free of charge, to any person obtaining a copy</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * of this software and associated documentation files (the &quot;Software&quot;), to</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * deal in the Software without restriction, including without limitation the</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * sell copies of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * The above copyright notice and this permission notice shall be included in all</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * copies or substantial portions of the Software.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="comment"> * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="comment"> * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="comment"> * SOFTWARE.</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="_convolution_layer_8h.xhtml">ConvolutionLayer.h</a>&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="tests_2validation_2_helpers_8h.xhtml">tests/validation/Helpers.h</a>&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacearm__compute.xhtml">arm_compute</a></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;{</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="keyword">namespace </span>test</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;{</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;<span class="keyword">namespace </span>validation</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;{</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">namespace </span>reference</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;{</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;<span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a994c9603f9aa41b731d957eebee4c8ee"> 37</a></span>&#160;<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;T&gt;</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a994c9603f9aa41b731d957eebee4c8ee">deconvolution_layer</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;T&gt;</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;T&gt;</a> &amp;weights, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;T&gt;</a> &amp;bias, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>,</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">info</a>, <span class="keyword">const</span> std::pair&lt;unsigned int, unsigned int&gt; &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>)</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160;{</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>&#160; <span class="comment">// Create reference</span></div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> stride_x = info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#ad2f1ea50a9e215ad8ef612a724a4866a">stride</a>().first;</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> stride_y = info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#ad2f1ea50a9e215ad8ef612a724a4866a">stride</a>().second;</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>&#160; <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> scaled_shape = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>();</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>&#160; <span class="keywordtype">int</span> out_x = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().x() + (src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().x() - 1) * (stride_x - 1) + a.first + 2 * info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().first;</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>&#160; <span class="keywordtype">int</span> out_y = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().y() + (src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().y() - 1) * (stride_y - 1) + a.second + 2 * info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().second;</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>&#160; scaled_shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a9c54fb6cea3557692fe7c00c40bb40ad">set</a>(0, out_x);</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>&#160; scaled_shape.<a class="code" href="classarm__compute_1_1_tensor_shape.xhtml#a9c54fb6cea3557692fe7c00c40bb40ad">set</a>(1, out_y);</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>&#160; <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;T&gt;</a> scaled{ scaled_shape, src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#a9a3e72153aeb3ed212e9c3698774e881">data_type</a>(), 1 };</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>&#160;</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_in = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().x();</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_in = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().y();</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_scaled = scaled.shape().x();</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_scaled = scaled.shape().y();</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> num_2d_slices = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().total_size() / (width_in * height_in);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> ax = a.first; <span class="comment">// The number of zeros added to right edge of the input.</span></div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> ay = a.second; <span class="comment">// The number of zeros added to top edge of the input.</span></div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().first &gt; (weights.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">shape</a>().x() - 1));</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(ax &gt; stride_x - 1, <span class="stringliteral">&quot;ax must be smaller than stride_x&quot;</span>);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(ay &gt; stride_y - 1, <span class="stringliteral">&quot;ay must be smaller than stride_y&quot;</span>);</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j = 0; j &lt; scaled.num_elements(); ++j)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; {</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; scaled[j] = T(0);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; }</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> slice = 0; slice &lt; num_2d_slices; ++slice)</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> offset_slice_in = slice * width_in * height_in;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> offset_slice_out = slice * width_scaled * height_scaled;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> start_x = info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().first;</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> start_y = ay + info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().second;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_y = height_scaled - info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().second;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> end_x = width_scaled - ax - info.<a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">pad</a>().first;</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> yi = start_y, in_y = 0; yi &lt; end_y; yi += stride_y, in_y++)</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; {</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">int</span> xi = start_x, in_x = 0; xi &lt; end_x; xi += stride_x, in_x++)</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; {</div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <span class="keyword">const</span> T *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a> = src.<a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#a0c52a8f0085b55d907af7210ef2069d0">data</a>() + offset_slice_in + in_y * width_in + in_x;</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160; T *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">out</a> = scaled.data() + offset_slice_out + xi + yi * width_scaled;</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; *out = *<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">in</a>;</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; }</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; }</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; }</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acbf8f8a6dd185de04c1981c57a8963cf">conv_info</a>(1, 1, 0, 0, 0, 0, <a class="code" href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa5bdce8e6d9dc3efbbd31e90a8a181dff">DimensionRoundingType::CEIL</a>);</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a8627576edf79d89aa9f70e079086e164">convolution_layer</a>(scaled, weights, bias, output_shape, conv_info);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;}</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="keyword">template</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;float&gt;</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a994c9603f9aa41b731d957eebee4c8ee">deconvolution_layer</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;float&gt;</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a>, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;float&gt;</a> &amp;weights, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;float&gt;</a> &amp;bias, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>,</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">info</a>, <span class="keyword">const</span> std::pair&lt;unsigned int, unsigned int&gt; &amp;<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a>);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160;<span class="keyword">template</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;half&gt;</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a994c9603f9aa41b731d957eebee4c8ee">deconvolution_layer</a>(<span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;half&gt;</a> &amp;src, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;half&gt;</a> &amp;weights, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">SimpleTensor&lt;half&gt;</a> &amp;bias, <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;output_shape,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="keyword">const</span> <a class="code" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;info, <span class="keyword">const</span> std::pair&lt;unsigned int, unsigned int&gt; &amp;a);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;} <span class="comment">// namespace reference</span></div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160;} <span class="comment">// namespace validation</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;} <span class="comment">// namespace test</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;} <span class="comment">// namespace arm_compute</span></div><div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml">arm_compute::TensorShape</a></div><div class="ttdoc">Shape of a tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00039">TensorShape.h:39</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a1fece1bd804e64f39f602d1c3969849aa5bdce8e6d9dc3efbbd31e90a8a181dff"><div class="ttname"><a href="namespacearm__compute.xhtml#a1fece1bd804e64f39f602d1c3969849aa5bdce8e6d9dc3efbbd31e90a8a181dff">arm_compute::DimensionRoundingType::CEIL</a></div><div class="ttdoc">Ceil rounding. </div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">gemm configure &amp; a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00102">GEMM.cpp:102</a></div></div>
<div class="ttc" id="classarm__compute_1_1_pad_stride_info_xhtml_a9a9d6d62752247f733a3466b484e08b9"><div class="ttname"><a href="classarm__compute_1_1_pad_stride_info.xhtml#a9a9d6d62752247f733a3466b484e08b9">arm_compute::PadStrideInfo::pad</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; pad() const </div><div class="ttdoc">Get the padding. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00635">Types.h:635</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_a9a3e72153aeb3ed212e9c3698774e881"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#a9a3e72153aeb3ed212e9c3698774e881">arm_compute::test::SimpleTensor::data_type</a></div><div class="ttdeci">DataType data_type() const override</div><div class="ttdoc">Data type of the tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00319">SimpleTensor.h:319</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad366eaa4cf2d106037d91c30795a5c76"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad366eaa4cf2d106037d91c30795a5c76">arm_compute::test::validation::in</a></div><div class="ttdeci">CLTensor in</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00241">Winograd.cpp:241</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a54a6080c9f4df1f908e57a9bbb46f5da"><div class="ttname"><a href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON(cond)</div><div class="ttdoc">If the condition is true then an error message is printed and an exception thrown. </div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00337">Error.h:337</a></div></div>
<div class="ttc" id="tests_2validation_2_helpers_8h_xhtml"><div class="ttname"><a href="tests_2validation_2_helpers_8h.xhtml">Helpers.h</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_aba5871b3e4a65d057ec1c28fce8b00ba"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#aba5871b3e4a65d057ec1c28fce8b00ba">arm_compute::test::SimpleTensor::shape</a></div><div class="ttdeci">TensorShape shape() const override</div><div class="ttdoc">Shape of the tensor. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00282">SimpleTensor.h:282</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a8627576edf79d89aa9f70e079086e164"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a8627576edf79d89aa9f70e079086e164">arm_compute::test::validation::reference::convolution_layer</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; convolution_layer(const SimpleTensor&lt; T &gt; &amp;src, const SimpleTensor&lt; T &gt; &amp;weights, const SimpleTensor&lt; TB &gt; &amp;bias, const TensorShape &amp;output_shape, const PadStrideInfo &amp;info, const Size2D &amp;dilation, unsigned int num_groups)</div><div class="ttdef"><b>Definition:</b> <a href="validation_2reference_2_convolution_layer_8cpp_source.xhtml#l00113">ConvolutionLayer.cpp:113</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a096668313a9a819d54a2e65ec21ff0cc"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a096668313a9a819d54a2e65ec21ff0cc">arm_compute::test::validation::info</a></div><div class="ttdeci">src info() -&gt; set_format(Format::S16)</div></div>
<div class="ttc" id="namespacearm__compute_xhtml"><div class="ttname"><a href="namespacearm__compute.xhtml">arm_compute</a></div><div class="ttdoc">This file contains all available output stages for GEMMLowp on OpenCL. </div><div class="ttdef"><b>Definition:</b> <a href="00__introduction_8dox_source.xhtml#l00001">00_introduction.dox:1</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml_a0c52a8f0085b55d907af7210ef2069d0"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml#a0c52a8f0085b55d907af7210ef2069d0">arm_compute::test::SimpleTensor::data</a></div><div class="ttdeci">const T * data() const </div><div class="ttdoc">Constant pointer to the underlying buffer. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00380">SimpleTensor.h:380</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_af8a8a0625e7981212a0af48deb9d2a09"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#af8a8a0625e7981212a0af48deb9d2a09">arm_compute::test::validation::out</a></div><div class="ttdeci">CLTensor out</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00242">Winograd.cpp:242</a></div></div>
<div class="ttc" id="classarm__compute_1_1_pad_stride_info_xhtml_ad2f1ea50a9e215ad8ef612a724a4866a"><div class="ttname"><a href="classarm__compute_1_1_pad_stride_info.xhtml#ad2f1ea50a9e215ad8ef612a724a4866a">arm_compute::PadStrideInfo::stride</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; stride() const </div><div class="ttdoc">Get the stride. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00617">Types.h:617</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7fc93f37dac131a1a40b7921f9df3a9a"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">arm_compute::test::validation::output_shape</a></div><div class="ttdeci">output_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_g_e_m_m_8cpp_source.xhtml#l00087">GEMM.cpp:87</a></div></div>
<div class="ttc" id="classarm__compute_1_1_pad_stride_info_xhtml"><div class="ttname"><a href="classarm__compute_1_1_pad_stride_info.xhtml">arm_compute::PadStrideInfo</a></div><div class="ttdoc">Padding and stride information class. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00569">Types.h:569</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acbf8f8a6dd185de04c1981c57a8963cf"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acbf8f8a6dd185de04c1981c57a8963cf">arm_compute::test::validation::conv_info</a></div><div class="ttdeci">conv_info</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00572">Winograd.cpp:572</a></div></div>
<div class="ttc" id="classarm__compute_1_1test_1_1_simple_tensor_xhtml"><div class="ttname"><a href="classarm__compute_1_1test_1_1_simple_tensor.xhtml">arm_compute::test::SimpleTensor</a></div><div class="ttdoc">Simple tensor object that stores elements in a consecutive chunk of memory. </div><div class="ttdef"><b>Definition:</b> <a href="_simple_tensor_8h_source.xhtml#l00059">SimpleTensor.h:59</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a994c9603f9aa41b731d957eebee4c8ee"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a994c9603f9aa41b731d957eebee4c8ee">arm_compute::test::validation::reference::deconvolution_layer</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; deconvolution_layer(const SimpleTensor&lt; T &gt; &amp;src, const SimpleTensor&lt; T &gt; &amp;weights, const SimpleTensor&lt; T &gt; &amp;bias, const TensorShape &amp;output_shape, const PadStrideInfo &amp;info, const std::pair&lt; unsigned int, unsigned int &gt; &amp;a)</div><div class="ttdoc">Deconvolution reference implementation. </div><div class="ttdef"><b>Definition:</b> <a href="reference_2_deconvolution_layer_8cpp_source.xhtml#l00037">DeconvolutionLayer.cpp:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_tensor_shape_xhtml_a9c54fb6cea3557692fe7c00c40bb40ad"><div class="ttname"><a href="classarm__compute_1_1_tensor_shape.xhtml#a9c54fb6cea3557692fe7c00c40bb40ad">arm_compute::TensorShape::set</a></div><div class="ttdeci">TensorShape &amp; set(size_t dimension, size_t value, bool apply_dim_correction=true)</div><div class="ttdoc">Accessor to set the value of one of the dimensions. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_shape_8h_source.xhtml#l00078">TensorShape.h:78</a></div></div>
<div class="ttc" id="_convolution_layer_8h_xhtml"><div class="ttname"><a href="_convolution_layer_8h.xhtml">ConvolutionLayer.h</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a5bbdcf574d3f5e412fa6a1117911e67b"><div class="ttname"><a href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_ON_MSG(cond,...)</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00328">Error.h:328</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="dir_59425e443f801f1f2fd8bbe4959a3ccf.xhtml">tests</a></li><li class="navelem"><a class="el" href="dir_e7c7b16542faa38cb4655ff1750d3604.xhtml">validation</a></li><li class="navelem"><a class="el" href="dir_46fdb196cebdbffe77dac340cde62f29.xhtml">reference</a></li><li class="navelem"><a class="el" href="reference_2_deconvolution_layer_8cpp.xhtml">DeconvolutionLayer.cpp</a></li>
<li class="footer">Generated on Wed Aug 29 2018 15:31:33 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
</ul>
</div>
</body>
</html>