blob: f4855d5c1ef34f02fca26429eb2e365654ce2519 [file] [log] [blame]
<!-- HTML header for doxygen 1.8.15-->
<!-- Remember to use version doxygen 1.8.15 +-->
<!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.15"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: TFPreproccessor Class Reference</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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(initResizable);
/* @license-end */</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/x-mathjax-config">
MathJax.Hub.Config({
extensions: ["tex2jax.js"],
jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="stylesheet.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;">
<img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/>
<td style="padding-left: 0.5em;">
<div id="projectname">
&#160;<span id="projectnumber">19.08</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></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">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml','');});
/* @license-end */
</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="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">TFPreproccessor Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>TF preproccessor.
<a href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>&gt;</code></p>
<div class="dynheader">
Collaboration diagram for TFPreproccessor:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor__coll__graph.svg" width="138" height="112"><p><b>This browser is not able to show SVG: try Firefox, Chrome, Safari, or Opera instead.</b></p></iframe>
</div>
<center><span class="legend">[<a target="top" href="graph_legend.xhtml">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ab58008704726cd07353605b1d9e13d86"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml#ab58008704726cd07353605b1d9e13d86">TFPreproccessor</a> (float min_range=-1.f, float max_range=1.f)</td></tr>
<tr class="memdesc:ab58008704726cd07353605b1d9e13d86"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#ab58008704726cd07353605b1d9e13d86">More...</a><br /></td></tr>
<tr class="separator:ab58008704726cd07353605b1d9e13d86"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1545d087d050b8e9733e7e212df73666"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml#a1545d087d050b8e9733e7e212df73666">preprocess</a> (<a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> &amp;tensor) override</td></tr>
<tr class="memdesc:a1545d087d050b8e9733e7e212df73666"><td class="mdescLeft">&#160;</td><td class="mdescRight">Preprocess the given tensor. <a href="#a1545d087d050b8e9733e7e212df73666">More...</a><br /></td></tr>
<tr class="separator:a1545d087d050b8e9733e7e212df73666"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a></td></tr>
<tr class="memitem:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#a145ae89877c556306c3b0a8d869b33f3">~IPreprocessor</a> ()=default</td></tr>
<tr class="memdesc:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default destructor. <a href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#a145ae89877c556306c3b0a8d869b33f3">More...</a><br /></td></tr>
<tr class="separator:a145ae89877c556306c3b0a8d869b33f3 inherit pub_methods_classarm__compute_1_1graph__utils_1_1_i_preprocessor"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>TF preproccessor. </p>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00079">79</a> of file <a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ab58008704726cd07353605b1d9e13d86"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab58008704726cd07353605b1d9e13d86">&#9670;&nbsp;</a></span>TFPreproccessor()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml">TFPreproccessor</a> </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>min_range</em> = <code>-1.f</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>max_range</em> = <code>1.f</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">min_range</td><td>Min normalization range. (Defaults to -1.f) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">max_range</td><td>Max normalization range. (Defaults to 1.f) </td></tr>
</table>
</dd>
</dl>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00060">60</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; : _min_range(min_range), _max_range(max_range)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160;{</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1545d087d050b8e9733e7e212df73666"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1545d087d050b8e9733e7e212df73666">&#9670;&nbsp;</a></span>preprocess()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void preprocess </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> &amp;&#160;</td>
<td class="paramname"><em>tensor</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Preprocess the given tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">tensor</td><td><a class="el" href="classarm__compute_1_1_tensor.xhtml" title="Basic implementation of the tensor interface.">Tensor</a> to preprocess. </td></tr>
</table>
</dd>
</dl>
<p>Implements <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml#ae699b63165de5182fda5a2337009641f">IPreprocessor</a>.</p>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00064">64</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><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; Window window;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; window.use_tensor_dimensions(tensor.info()-&gt;tensor_shape());</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">float</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a87f09c74765be18a99038478f96daf9b">range</a> = _max_range - _min_range;</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; <a class="code" href="namespacearm__compute.xhtml#a5002bf7ec46d52971f9526e94172cfee">execute_window_loop</a>(window, [&amp;](<span class="keyword">const</span> Coordinates &amp; <span class="keywordtype">id</span>)</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; {</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; <span class="keyword">const</span> <span class="keywordtype">float</span> value = *reinterpret_cast&lt;float *&gt;(tensor.ptr_to_element(<span class="keywordtype">id</span>));</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <span class="keywordtype">float</span> res = value / 255.f; <span class="comment">// Normalize to [0, 1]</span></div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; res = res * <a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a87f09c74765be18a99038478f96daf9b">range</a> + _min_range; <span class="comment">// Map to [min_range, max_range]</span></div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; *reinterpret_cast&lt;float *&gt;(tensor.ptr_to_element(<span class="keywordtype">id</span>)) = res;</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;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a87f09c74765be18a99038478f96daf9b"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a87f09c74765be18a99038478f96daf9b">arm_compute::test::validation::reference::range</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; range(SimpleTensor&lt; T &gt; &amp;dst, float start, const size_t num_of_elements, float step)</div><div class="ttdef"><b>Definition:</b> <a href="reference_2_range_8cpp_source.xhtml#l00050">Range.cpp:50</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a5002bf7ec46d52971f9526e94172cfee"><div class="ttname"><a href="namespacearm__compute.xhtml#a5002bf7ec46d52971f9526e94172cfee">arm_compute::execute_window_loop</a></div><div class="ttdeci">void execute_window_loop(const Window &amp;w, L &amp;&amp;lambda_function, Ts &amp;&amp;... iterators)</div><div class="ttdoc">Iterate through the passed window, automatically adjusting the iterators and calling the lambda_funct...</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00122">Helpers.inl:122</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_helpers_8inl_source.xhtml#l00122">arm_compute::execute_window_loop()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="reference_2_range_8cpp_source.xhtml#l00050">arm_compute::test::validation::reference::range()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="_window_8inl_source.xhtml#l00250">Window::use_tensor_dimensions()</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>utils/<a class="el" href="_graph_utils_8h_source.xhtml">GraphUtils.h</a></li>
<li>utils/<a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a></li>
</ul>
</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="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1graph__utils.xhtml">graph_utils</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1graph__utils_1_1_t_f_preproccessor.xhtml">TFPreproccessor</a></li>
<li class="footer">Generated on Mon Sep 2 2019 11:47:39 for Compute Library by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li>
</ul>
</div>
</body>
</html>