blob: a18135b205a5d84b2a0cb1950e1ffe5a5577cd44 [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">20.02.1</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#l00254">254</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#l00293">293</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00300"></a><span class="lineno"> 300</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="l00301"></a><span class="lineno"> 301</span>&#160;{</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; <a class="code" href="_error_8h.xhtml#a292b758f9eba8b487d71eae4b37326fc">ARM_COMPUTE_EXIT_ON_MSG</a>(start &gt; end, <span class="stringliteral">&quot;Invalid validation range!&quot;</span>);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; std::ifstream ifs;</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="keywordflow">try</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; {</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; ifs.exceptions(std::ifstream::badbit);</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; ifs.open(image_list, std::ios::in | std::ios::binary);</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160;</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; <span class="comment">// Parse image names</span></div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> counter = 0;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</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="l00313"></a><span class="lineno"> 313</span>&#160; {</div><div class="line"><a name="l00314"></a><span class="lineno"> 314</span>&#160; <span class="comment">// Add image to process if withing range</span></div><div class="line"><a name="l00315"></a><span class="lineno"> 315</span>&#160; <span class="keywordflow">if</span>(counter &gt;= start)</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>&#160; {</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>&#160; std::stringstream linestream(line);</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>&#160; std::string image_name;</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>&#160;</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>&#160; linestream &gt;&gt; image_name;</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span>&#160; _images.emplace_back(std::move(image_name));</div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>&#160; }</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>&#160; }</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; }</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; <span class="keywordflow">catch</span>(<span class="keyword">const</span> std::ifstream::failure &amp;e)</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; {</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; <a class="code" href="_error_8h.xhtml#abd040a16dc0dbc75733e07aff93048a8">ARM_COMPUTE_ERROR_VAR</a>(<span class="stringliteral">&quot;Accessing %s: %s&quot;</span>, image_list.c_str(), e.what());</div><div class="line"><a name="l00328"></a><span class="lineno"> 328</span>&#160; }</div><div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_abd040a16dc0dbc75733e07aff93048a8"><div class="ttname"><a href="_error_8h.xhtml#abd040a16dc0dbc75733e07aff93048a8">ARM_COMPUTE_ERROR_VAR</a></div><div class="ttdeci">#define ARM_COMPUTE_ERROR_VAR(msg,...)</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#l00346">Error.h:346</a></div></div>
<div class="ttc" id="_error_8h_xhtml_a292b758f9eba8b487d71eae4b37326fc"><div class="ttname"><a href="_error_8h.xhtml#a292b758f9eba8b487d71eae4b37326fc">ARM_COMPUTE_EXIT_ON_MSG</a></div><div class="ttdeci">#define ARM_COMPUTE_EXIT_ON_MSG(cond, msg)</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#l00379">Error.h:379</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00346">ARM_COMPUTE_ERROR_VAR</a>, and <a class="el" href="_error_8h_source.xhtml#l00379">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#l00331">331</a> of file <a class="el" href="_graph_utils_8cpp_source.xhtml">GraphUtils.cpp</a>.</p>
<div class="fragment"><div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160;{</div><div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; <span class="keywordtype">bool</span> ret = _offset &lt; _images.size();</div><div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; <span class="keywordflow">if</span>(ret)</div><div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160; {</div><div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; utils::JPEGLoader jpeg;</div><div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160;</div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160; <span class="comment">// Open JPEG file</span></div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160; std::string image_name = _path + _images[_offset++];</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; jpeg.open(image_name);</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</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="l00342"></a><span class="lineno"> 342</span>&#160;</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; <span class="comment">// Get permutated shape and permutation parameters</span></div><div class="line"><a name="l00344"></a><span class="lineno"> 344</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="l00345"></a><span class="lineno"> 345</span>&#160; <a class="code" href="classarm__compute_1_1_strides.xhtml">arm_compute::PermutationVector</a> perm;</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</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="l00347"></a><span class="lineno"> 347</span>&#160; {</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</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="l00349"></a><span class="lineno"> 349</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="l00350"></a><span class="lineno"> 350</span>&#160; }</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>&#160; <a class="code" href="_error_8h.xhtml#ac75ba282eb0cacd31fd4c6e6a47dbbc8">ARM_COMPUTE_EXIT_ON_MSG_VAR</a>(jpeg.width() != permuted_shape.x() || jpeg.height() != permuted_shape.y(),</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>&#160; <span class="stringliteral">&quot;Failed to load image file: dimensions [%d,%d] not correct, expected [%&quot;</span> PRIu32 <span class="stringliteral">&quot;,%&quot;</span> PRIu32 <span class="stringliteral">&quot;].&quot;</span>,</div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>&#160; jpeg.width(), jpeg.height(), permuted_shape.x(), permuted_shape.y());</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>&#160; <span class="comment">// Fill the tensor with the JPEG content (BGR)</span></div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>&#160; jpeg.fill_planar_tensor(tensor, _bgr);</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>&#160;</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>&#160; <span class="comment">// Preprocess tensor</span></div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>&#160; <span class="keywordflow">if</span>(_preprocessor)</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span>&#160; {</div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>&#160; _preprocessor-&gt;preprocess(tensor);</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; }</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; }</div><div class="line"><a name="l00364"></a><span class="lineno"> 364</span>&#160;</div><div class="line"><a name="l00365"></a><span class="lineno"> 365</span>&#160; <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160;}</div><div class="ttc" id="_error_8h_xhtml_ac75ba282eb0cacd31fd4c6e6a47dbbc8"><div class="ttname"><a href="_error_8h.xhtml#ac75ba282eb0cacd31fd4c6e6a47dbbc8">ARM_COMPUTE_EXIT_ON_MSG_VAR</a></div><div class="ttdeci">#define ARM_COMPUTE_EXIT_ON_MSG_VAR(cond, msg,...)</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#l00395">Error.h:395</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#l00395">ARM_COMPUTE_EXIT_ON_MSG_VAR</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#l00257">IImageLoader::fill_planar_tensor()</a>, <a class="el" href="_image_loader_8h_source.xhtml#l00142">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#l00456">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#l00137">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 Thu Mar 5 2020 16:07:18 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>