blob: e8599b0bb414394f0ceb323b3854c65997ac6332 [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: ValidationInputAccessor 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_validation_input_accessor.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">ValidationInputAccessor Class Reference<span class="mlabels"><span class="mlabel">final</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Input Accessor used for network validation.
<a href="classarm__compute_1_1graph__utils_1_1_validation_input_accessor.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 ValidationInputAccessor:</div>
<div class="dyncontent">
<div class="center"><iframe scrolling="no" frameborder="0" src="classarm__compute_1_1graph__utils_1_1_validation_input_accessor__coll__graph.svg" width="186" 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:a458082188f9eec9fdf459f508d64d9be"><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_validation_input_accessor.xhtml#a458082188f9eec9fdf459f508d64d9be">ValidationInputAccessor</a> (const std::string &amp;image_list, std::string images_path, std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a> &gt; preprocessor=nullptr, bool bgr=true, unsigned int start=0, unsigned int end=0, std::ostream &amp;output_stream=std::cout)</td></tr>
<tr class="memdesc:a458082188f9eec9fdf459f508d64d9be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor. <a href="#a458082188f9eec9fdf459f508d64d9be">More...</a><br /></td></tr>
<tr class="separator:a458082188f9eec9fdf459f508d64d9be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab469d593b4bc92e1d1132a03de0aedca"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph__utils_1_1_validation_input_accessor.xhtml#ab469d593b4bc92e1d1132a03de0aedca">access_tensor</a> (<a class="el" href="classarm__compute_1_1_i_tensor.xhtml">ITensor</a> &amp;tensor) override</td></tr>
<tr class="memdesc:ab469d593b4bc92e1d1132a03de0aedca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Interface to be implemented to access a given tensor. <a href="#ab469d593b4bc92e1d1132a03de0aedca">More...</a><br /></td></tr>
<tr class="separator:ab469d593b4bc92e1d1132a03de0aedca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classarm__compute_1_1graph_1_1_i_tensor_accessor"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarm__compute_1_1graph_1_1_i_tensor_accessor')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml">ITensorAccessor</a></td></tr>
<tr class="memitem:a3c7f21c2eb00ab7ae1c18b1418c0d9c6 inherit pub_methods_classarm__compute_1_1graph_1_1_i_tensor_accessor"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml#a3c7f21c2eb00ab7ae1c18b1418c0d9c6">~ITensorAccessor</a> ()=default</td></tr>
<tr class="memdesc:a3c7f21c2eb00ab7ae1c18b1418c0d9c6 inherit pub_methods_classarm__compute_1_1graph_1_1_i_tensor_accessor"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default virtual destructor. <a href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml#a3c7f21c2eb00ab7ae1c18b1418c0d9c6">More...</a><br /></td></tr>
<tr class="separator:a3c7f21c2eb00ab7ae1c18b1418c0d9c6 inherit pub_methods_classarm__compute_1_1graph_1_1_i_tensor_accessor"><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>Input Accessor used for network validation. </p>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8h_source.xhtml#l00221">221</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="a458082188f9eec9fdf459f508d64d9be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a458082188f9eec9fdf459f508d64d9be">&#9670;&nbsp;</a></span>ValidationInputAccessor()</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_validation_input_accessor.xhtml">ValidationInputAccessor</a> </td>
<td>(</td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>image_list</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::string&#160;</td>
<td class="paramname"><em>images_path</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1graph__utils_1_1_i_preprocessor.xhtml">IPreprocessor</a> &gt;&#160;</td>
<td class="paramname"><em>preprocessor</em> = <code>nullptr</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>bgr</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>start</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>end</em> = <code>0</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::ostream &amp;&#160;</td>
<td class="paramname"><em>output_stream</em> = <code>std::cout</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">image_list</td><td>File containing all the images to validate </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">images_path</td><td>Path to images. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">bgr</td><td>(Optional) Fill the first plane with blue channel (default = false - RGB format) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">preprocessor</td><td>(Optional) <a class="el" href="struct_image.xhtml" title="Structure to hold Image information.">Image</a> pre-processing object (default = nullptr) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">start</td><td>(Optional) Start range </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">end</td><td>(Optional) End range </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">output_stream</td><td>(Optional) Output stream</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Range is defined as [start, end] </dd></dl>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00243">243</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; : _path(std::move(images_path)), _images(), _preprocessor(std::move(preprocessor)), _bgr(bgr), _offset(0), _output_stream(output_stream)</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;{</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <a class="code" href="_error_8h.xhtml#ad39a3601153da57978bb5124ace35d36">ARM_COMPUTE_EXIT_ON_MSG</a>(start &gt; end, <span class="stringliteral">&quot;Invalid validation range!&quot;</span>);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160; std::ifstream ifs;</div><div class="line"><a name="l00255"></a><span class="lineno"> 255</span>&#160; <span class="keywordflow">try</span></div><div class="line"><a name="l00256"></a><span class="lineno"> 256</span>&#160; {</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160; ifs.exceptions(std::ifstream::badbit);</div><div class="line"><a name="l00258"></a><span class="lineno"> 258</span>&#160; ifs.open(image_list, std::ios::in | std::ios::binary);</div><div class="line"><a name="l00259"></a><span class="lineno"> 259</span>&#160;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160; <span class="comment">// Parse image names</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> counter = 0;</div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <span class="keywordflow">for</span>(std::string line; !std::getline(ifs, line).fail() &amp;&amp; counter &lt;= end; ++counter)</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; {</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; <span class="comment">// Add image to process if withing range</span></div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="keywordflow">if</span>(counter &gt;= start)</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; {</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; std::stringstream linestream(line);</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; std::string image_name;</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; linestream &gt;&gt; image_name;</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; _images.emplace_back(std::move(image_name));</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span>&#160; }</div><div class="line"><a name="l00273"></a><span class="lineno"> 273</span>&#160; }</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; }</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160; {</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160; <a class="code" href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a>(<span class="stringliteral">&quot;Accessing %s: %s&quot;</span>, image_list.c_str(), e.what());</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; }</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_a05b19c75afe9c24200a62b9724734bbd"><div class="ttname"><a href="_error_8h.xhtml#a05b19c75afe9c24200a62b9724734bbd">ARM_COMPUTE_ERROR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR(...)</div><div class="ttdoc">Print the given message then throw an std::runtime_error.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00261">Error.h:261</a></div></div>
<div class="ttc" id="_error_8h_xhtml_ad39a3601153da57978bb5124ace35d36"><div class="ttname"><a href="_error_8h.xhtml#ad39a3601153da57978bb5124ace35d36">ARM_COMPUTE_EXIT_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_EXIT_ON_MSG(cond,...)</div><div class="ttdoc">If the condition is true, the given message is printed and program exits.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00277">Error.h:277</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00261">ARM_COMPUTE_ERROR</a>, and <a class="el" href="_error_8h_source.xhtml#l00277">ARM_COMPUTE_EXIT_ON_MSG</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab469d593b4bc92e1d1132a03de0aedca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab469d593b4bc92e1d1132a03de0aedca">&#9670;&nbsp;</a></span>access_tensor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool access_tensor </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>Interface to be implemented to access a 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 be accessed</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if access is successful else false </dd></dl>
<p>Implements <a class="el" href="classarm__compute_1_1graph_1_1_i_tensor_accessor.xhtml#a497873c25847d7b4f60f37a1a3aa7665">ITensorAccessor</a>.</p>
<p class="definition">Definition at line <a class="el" href="_graph_utils_8cpp_source.xhtml#l00281">281</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160;{</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; <span class="keywordtype">bool</span> ret = _offset &lt; _images.size();</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160; <span class="keywordflow">if</span>(ret)</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; {</div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; utils::JPEGLoader jpeg;</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; <span class="comment">// Open JPEG file</span></div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; std::string image_name = _path + _images[_offset++];</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160; jpeg.open(image_name);</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; _output_stream &lt;&lt; <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; _offset &lt;&lt; <span class="stringliteral">&quot;/&quot;</span> &lt;&lt; _images.size() &lt;&lt; <span class="stringliteral">&quot;] Validating &quot;</span> &lt;&lt; image_name &lt;&lt; std::endl;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160; <span class="comment">// Get permutated shape and permutation parameters</span></div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; TensorShape permuted_shape = tensor.<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">tensor_shape</a>();</div><div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="classarm__compute_1_1_strides.xhtml">arm_compute::PermutationVector</a> perm;</div><div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; <span class="keywordflow">if</span>(tensor.<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">data_layout</a>() != <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">DataLayout::NCHW</a>)</div><div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160; {</div><div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; std::tie(permuted_shape, perm) = compute_permutation_parameters(tensor.<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">tensor_shape</a>(),</div><div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; tensor.<a class="code" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">info</a>()-&gt;<a class="code" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">data_layout</a>());</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160; }</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <a class="code" href="_error_8h.xhtml#ad39a3601153da57978bb5124ace35d36">ARM_COMPUTE_EXIT_ON_MSG</a>(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <span class="stringliteral">&quot;Failed to load image file: dimensions [%d,%d] not correct, expected [%d,%d].&quot;</span>,</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160;</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="comment">// Fill the tensor with the JPEG content (BGR)</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; jpeg.fill_planar_tensor(tensor, _bgr);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="comment">// Preprocess tensor</span></div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; <span class="keywordflow">if</span>(_preprocessor)</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; {</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; _preprocessor-&gt;preprocess(tensor);</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; }</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160; }</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160;</div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_ad39a3601153da57978bb5124ace35d36"><div class="ttname"><a href="_error_8h.xhtml#ad39a3601153da57978bb5124ace35d36">ARM_COMPUTE_EXIT_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_EXIT_ON_MSG(cond,...)</div><div class="ttdoc">If the condition is true, the given message is printed and program exits.</div><div class="ttdef"><b>Definition:</b> <a href="_error_8h_source.xhtml#l00277">Error.h:277</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a7c66505457d00ece3aa4b34cab80757d"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">arm_compute::ITensorInfo::tensor_shape</a></div><div class="ttdeci">virtual const TensorShape &amp; tensor_shape() const =0</div><div class="ttdoc">Size for each dimension of the tensor.</div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_xhtml_a0e95dc1e53c361348314873b168ae237"><div class="ttname"><a href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">arm_compute::ITensor::info</a></div><div class="ttdeci">virtual ITensorInfo * info() const =0</div><div class="ttdoc">Interface to be implemented by the child class to return the tensor's metadata.</div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">arm_compute::DataLayout::NCHW</a></div><div class="ttdoc">Num samples, channels, height, width.</div></div>
<div class="ttc" id="classarm__compute_1_1_strides_xhtml"><div class="ttname"><a href="classarm__compute_1_1_strides.xhtml">arm_compute::Strides</a></div><div class="ttdoc">Strides of an item in bytes.</div><div class="ttdef"><b>Definition:</b> <a href="_strides_8h_source.xhtml#l00037">Strides.h:37</a></div></div>
<div class="ttc" id="classarm__compute_1_1_i_tensor_info_xhtml_a367b5090ab432bc7de2c32369e087ab1"><div class="ttname"><a href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">arm_compute::ITensorInfo::data_layout</a></div><div class="ttdeci">virtual DataLayout data_layout() const =0</div><div class="ttdoc">Get the data layout of the tensor.</div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00277">ARM_COMPUTE_EXIT_ON_MSG</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00256">IImageLoader::fill_planar_tensor()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00141">IImageLoader::height()</a>, <a class="el" href="classarm__compute_1_1_i_tensor.xhtml#a0e95dc1e53c361348314873b168ae237">ITensor::info()</a>, <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">arm_compute::NCHW</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00446">JPEGLoader::open()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00136">IImageLoader::width()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00081">Dimensions&lt; T &gt;::x()</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00086">Dimensions&lt; T &gt;::y()</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_validation_input_accessor.xhtml">ValidationInputAccessor</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>