blob: 4c98aaba28cdc9dcf7a55db0c54ddf5f990d5741 [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: arm_compute::misc::shape_calculator Namespace 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('namespacearm__compute_1_1misc_1_1shape__calculator.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="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">arm_compute::misc::shape_calculator Namespace Reference</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a951fb0d8dcf2a2a338e26a59ffc9af17"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a951fb0d8dcf2a2a338e26a59ffc9af17">compute_vector_to_tensor_output_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input, size_t conv_w, size_t conv_h, const <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> &amp;data_layout)</td></tr>
<tr class="memdesc:a951fb0d8dcf2a2a338e26a59ffc9af17"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the output tensor shape of a vector input given the convolution dimensions. <a href="#a951fb0d8dcf2a2a338e26a59ffc9af17">More...</a><br /></td></tr>
<tr class="separator:a951fb0d8dcf2a2a338e26a59ffc9af17"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a593fb7ecc281425b190cd6f20164b1a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a593fb7ecc281425b190cd6f20164b1a3">compute_permutation_output_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="namespacearm__compute.xhtml#a33e65be485104e2e9e69fca551d6f492">PermutationVector</a> &amp;perm)</td></tr>
<tr class="memdesc:a593fb7ecc281425b190cd6f20164b1a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the permuted shape of an input given a permutation vector. <a href="#a593fb7ecc281425b190cd6f20164b1a3">More...</a><br /></td></tr>
<tr class="separator:a593fb7ecc281425b190cd6f20164b1a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbc83cd4145d161da4c026e1f5743e1d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#afbc83cd4145d161da4c026e1f5743e1d">compute_reorg_output_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, int32_t stride)</td></tr>
<tr class="memdesc:afbc83cd4145d161da4c026e1f5743e1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the output shape of the reorg layer given a stride. <a href="#afbc83cd4145d161da4c026e1f5743e1d">More...</a><br /></td></tr>
<tr class="separator:afbc83cd4145d161da4c026e1f5743e1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6365b505b5c1b98916425bc692b6ea49"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a6365b505b5c1b98916425bc692b6ea49">compute_weights_reshaped_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;weights, bool has_bias=false, unsigned int num_groups=1)</td></tr>
<tr class="memdesc:a6365b505b5c1b98916425bc692b6ea49"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the reshaped shape of the weights. <a href="#a6365b505b5c1b98916425bc692b6ea49">More...</a><br /></td></tr>
<tr class="separator:a6365b505b5c1b98916425bc692b6ea49"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a389f89ab5121dad0906d0b7324fbf73d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a389f89ab5121dad0906d0b7324fbf73d">compute_lhs_reshaped_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;a, const <a class="el" href="structarm__compute_1_1_g_e_m_m_l_h_s_matrix_info.xhtml">GEMMLHSMatrixInfo</a> &amp;lhs_info, bool reinterpret_input_as_3d=false)</td></tr>
<tr class="memdesc:a389f89ab5121dad0906d0b7324fbf73d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the Left Hand Side matrix reshaped shape. <a href="#a389f89ab5121dad0906d0b7324fbf73d">More...</a><br /></td></tr>
<tr class="separator:a389f89ab5121dad0906d0b7324fbf73d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09ad10a110d947fd9c444b2ea5e4c127"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a09ad10a110d947fd9c444b2ea5e4c127">compute_rhs_reshaped_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;a, const <a class="el" href="structarm__compute_1_1_g_e_m_m_r_h_s_matrix_info.xhtml">GEMMRHSMatrixInfo</a> &amp;rhs_info)</td></tr>
<tr class="memdesc:a09ad10a110d947fd9c444b2ea5e4c127"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the Right Hand Side matrix reshaped shape. <a href="#a09ad10a110d947fd9c444b2ea5e4c127">More...</a><br /></td></tr>
<tr class="separator:a09ad10a110d947fd9c444b2ea5e4c127"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d52adbbcd2c53f837c96b5a3d15c4fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a8d52adbbcd2c53f837c96b5a3d15c4fb">compute_interleaved_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;a, int mult_interleave4x4_height=1, bool reinterpret_input_as_3d=false)</td></tr>
<tr class="memdesc:a8d52adbbcd2c53f837c96b5a3d15c4fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the interleaved shape of an input tensor. <a href="#a8d52adbbcd2c53f837c96b5a3d15c4fb">More...</a><br /></td></tr>
<tr class="separator:a8d52adbbcd2c53f837c96b5a3d15c4fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f10bc0f3e2a0126ce8c26e3d6a8fb96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a3f10bc0f3e2a0126ce8c26e3d6a8fb96">compute_reshaped_depthwise_weights_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="structarm__compute_1_1_depthwise_convolution_reshape_info.xhtml">DepthwiseConvolutionReshapeInfo</a> &amp;info)</td></tr>
<tr class="memdesc:a3f10bc0f3e2a0126ce8c26e3d6a8fb96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the reshaped shape of the weights to use in depthwise convolution. <a href="#a3f10bc0f3e2a0126ce8c26e3d6a8fb96">More...</a><br /></td></tr>
<tr class="separator:a3f10bc0f3e2a0126ce8c26e3d6a8fb96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70a2ef9fd754b5798a0a92656f8b5fcf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a70a2ef9fd754b5798a0a92656f8b5fcf">compute_transpose1xW_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;b)</td></tr>
<tr class="memdesc:a70a2ef9fd754b5798a0a92656f8b5fcf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the transposed 1xW shape. <a href="#a70a2ef9fd754b5798a0a92656f8b5fcf">More...</a><br /></td></tr>
<tr class="separator:a70a2ef9fd754b5798a0a92656f8b5fcf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5797726a8fbee3b11b92757c2f0031d6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a5797726a8fbee3b11b92757c2f0031d6">compute_transpose1xW_with_element_size_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;b, int mult_transpose1xW_width=1)</td></tr>
<tr class="memdesc:a5797726a8fbee3b11b92757c2f0031d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the transposed 1xW width element shape. <a href="#a5797726a8fbee3b11b92757c2f0031d6">More...</a><br /></td></tr>
<tr class="separator:a5797726a8fbee3b11b92757c2f0031d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60ce6c017f70d978b48b101ce314969e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a60ce6c017f70d978b48b101ce314969e">compute_reductionA_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;b)</td></tr>
<tr class="memdesc:a60ce6c017f70d978b48b101ce314969e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the reductionA shape used in GEMMLowp. <a href="#a60ce6c017f70d978b48b101ce314969e">More...</a><br /></td></tr>
<tr class="separator:a60ce6c017f70d978b48b101ce314969e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69f9b3191aafc4905f9d029ff9d48fea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a69f9b3191aafc4905f9d029ff9d48fea">compute_reductionB_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;a)</td></tr>
<tr class="memdesc:a69f9b3191aafc4905f9d029ff9d48fea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the reductionB shape used in GEMMLowp. <a href="#a69f9b3191aafc4905f9d029ff9d48fea">More...</a><br /></td></tr>
<tr class="separator:a69f9b3191aafc4905f9d029ff9d48fea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a264e2e6d3ff632e90d450435fce66d54"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a264e2e6d3ff632e90d450435fce66d54">compute_col2im_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;convolved_dims, bool batch_size_on_z, unsigned int num_groups=1)</td></tr>
<tr class="memdesc:a264e2e6d3ff632e90d450435fce66d54"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the Col2Im shape. <a href="#a264e2e6d3ff632e90d450435fce66d54">More...</a><br /></td></tr>
<tr class="separator:a264e2e6d3ff632e90d450435fce66d54"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69cb11b5b37f94a6bea9eaad9d13cccf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a69cb11b5b37f94a6bea9eaad9d13cccf">compute_transposed_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input)</td></tr>
<tr class="memdesc:a69cb11b5b37f94a6bea9eaad9d13cccf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the transposed shape of a tensor. <a href="#a69cb11b5b37f94a6bea9eaad9d13cccf">More...</a><br /></td></tr>
<tr class="separator:a69cb11b5b37f94a6bea9eaad9d13cccf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac7147815227e7ba91814cfdcd38f23ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ac7147815227e7ba91814cfdcd38f23ed">compute_depthwise_convolution_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;weights, <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> conv_info, unsigned int depth_multiplier, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;dilation=<a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a>(1U, 1U))</td></tr>
<tr class="memdesc:ac7147815227e7ba91814cfdcd38f23ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the depthwise convolution output shape of a tensor. <a href="#ac7147815227e7ba91814cfdcd38f23ed">More...</a><br /></td></tr>
<tr class="separator:ac7147815227e7ba91814cfdcd38f23ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8234d85cf61e3eb6fa00c012bee6f5bf"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a8234d85cf61e3eb6fa00c012bee6f5bf">compute_deconvolution_upsampled_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;weights, unsigned int sx, unsigned int sy, std::pair&lt; unsigned int, unsigned int &gt; &amp;out_dims, unsigned int &amp;padx, unsigned int &amp;pady)</td></tr>
<tr class="memdesc:a8234d85cf61e3eb6fa00c012bee6f5bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the upsampled output shape used for deconvolution. <a href="#a8234d85cf61e3eb6fa00c012bee6f5bf">More...</a><br /></td></tr>
<tr class="separator:a8234d85cf61e3eb6fa00c012bee6f5bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae270329cfe3dbab009b700318e8af8b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ae270329cfe3dbab009b700318e8af8b4">compute_deconvolution_output_shape</a> (const std::pair&lt; unsigned int, unsigned int &gt; &amp;out_dims, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;weights)</td></tr>
<tr class="memdesc:ae270329cfe3dbab009b700318e8af8b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the output shape of the deconvolution layer. <a href="#ae270329cfe3dbab009b700318e8af8b4">More...</a><br /></td></tr>
<tr class="separator:ae270329cfe3dbab009b700318e8af8b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a9286d053e9f3a958064e4f3cdd02f7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a8a9286d053e9f3a958064e4f3cdd02f7">compute_im2col_conv_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;kernel_dims, const <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;conv_info, bool has_bias, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;dilation, bool batch_size_on_z, unsigned int num_groups=1)</td></tr>
<tr class="memdesc:a8a9286d053e9f3a958064e4f3cdd02f7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the im2col output shape of a tensor. <a href="#a8a9286d053e9f3a958064e4f3cdd02f7">More...</a><br /></td></tr>
<tr class="separator:a8a9286d053e9f3a958064e4f3cdd02f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a83efb6708574e67d13965bcd2059ad75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a83efb6708574e67d13965bcd2059ad75">compute_flatten_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input)</td></tr>
<tr class="memdesc:a83efb6708574e67d13965bcd2059ad75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the flattened output shape of a tensor. <a href="#a83efb6708574e67d13965bcd2059ad75">More...</a><br /></td></tr>
<tr class="separator:a83efb6708574e67d13965bcd2059ad75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad16b366db486fec63b6d962937ec4545"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ad16b366db486fec63b6d962937ec4545">compute_softmax_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, size_t axis=1)</td></tr>
<tr class="memdesc:ad16b366db486fec63b6d962937ec4545"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the softmax output shape of a tensor. <a href="#ad16b366db486fec63b6d962937ec4545">More...</a><br /></td></tr>
<tr class="separator:ad16b366db486fec63b6d962937ec4545"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a25e3751f07d4b2771a05d8d01a7f7620"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a25e3751f07d4b2771a05d8d01a7f7620">compute_winograd_filter_transform_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;winograd_info)</td></tr>
<tr class="memdesc:a25e3751f07d4b2771a05d8d01a7f7620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the winograd filter transform shape. <a href="#a25e3751f07d4b2771a05d8d01a7f7620">More...</a><br /></td></tr>
<tr class="separator:a25e3751f07d4b2771a05d8d01a7f7620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04249f91ec2964d21a91bb7038821000"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a04249f91ec2964d21a91bb7038821000">compute_winograd_input_transform_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;winograd_info)</td></tr>
<tr class="memdesc:a04249f91ec2964d21a91bb7038821000"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the winograd input transform shape. <a href="#a04249f91ec2964d21a91bb7038821000">More...</a><br /></td></tr>
<tr class="separator:a04249f91ec2964d21a91bb7038821000"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5699c316d27b41f0790827791e88ae26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a5699c316d27b41f0790827791e88ae26">compute_winograd_output_transform_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;winograd_info)</td></tr>
<tr class="memdesc:a5699c316d27b41f0790827791e88ae26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the winograd output transform shape. <a href="#a5699c316d27b41f0790827791e88ae26">More...</a><br /></td></tr>
<tr class="separator:a5699c316d27b41f0790827791e88ae26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d320d308c16b8ddda3c9d3f60fad79c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a5d320d308c16b8ddda3c9d3f60fad79c">compute_deep_convolution_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;weights, <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> conv_info)</td></tr>
<tr class="memdesc:a5d320d308c16b8ddda3c9d3f60fad79c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the deep convolution shape output shape of a tensor. <a href="#a5d320d308c16b8ddda3c9d3f60fad79c">More...</a><br /></td></tr>
<tr class="separator:a5d320d308c16b8ddda3c9d3f60fad79c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b843e3850ed7324d11f77882cc597ae"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a1b843e3850ed7324d11f77882cc597ae">compute_min_max_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input)</td></tr>
<tr class="memdesc:a1b843e3850ed7324d11f77882cc597ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the min/max shape output shape of a tensor. <a href="#a1b843e3850ed7324d11f77882cc597ae">More...</a><br /></td></tr>
<tr class="separator:a1b843e3850ed7324d11f77882cc597ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad242bedd6845b8fc13ade41cfc062c83"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ad242bedd6845b8fc13ade41cfc062c83">compute_pool_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, <a class="el" href="classarm__compute_1_1_pooling_layer_info.xhtml">PoolingLayerInfo</a> pool_info)</td></tr>
<tr class="memdesc:ad242bedd6845b8fc13ade41cfc062c83"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the output pool shape of a tensor. <a href="#ad242bedd6845b8fc13ade41cfc062c83">More...</a><br /></td></tr>
<tr class="separator:ad242bedd6845b8fc13ade41cfc062c83"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d3eaddfd85c16e7a9a385ba0e6a45b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a3d3eaddfd85c16e7a9a385ba0e6a45b0">compute_roi_align_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;rois, <a class="el" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml">ROIPoolingLayerInfo</a> pool_info)</td></tr>
<tr class="memdesc:a3d3eaddfd85c16e7a9a385ba0e6a45b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the output roi align shape of a tensor. <a href="#a3d3eaddfd85c16e7a9a385ba0e6a45b0">More...</a><br /></td></tr>
<tr class="separator:a3d3eaddfd85c16e7a9a385ba0e6a45b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af98bc3ef5c65dbb63bc79700ccdd043b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#af98bc3ef5c65dbb63bc79700ccdd043b">compute_rnn_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, const unsigned int batch_size)</td></tr>
<tr class="memdesc:af98bc3ef5c65dbb63bc79700ccdd043b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the RNN shape of a tensor. <a href="#af98bc3ef5c65dbb63bc79700ccdd043b">More...</a><br /></td></tr>
<tr class="separator:af98bc3ef5c65dbb63bc79700ccdd043b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adca241b012a5e00ddfcdc5a8db05a2a3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#adca241b012a5e00ddfcdc5a8db05a2a3">compute_mm_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input0, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input1, bool is_interleaved_transposed, const <a class="el" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">GEMMReshapeInfo</a> &amp;reshape_info)</td></tr>
<tr class="memdesc:adca241b012a5e00ddfcdc5a8db05a2a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the matrix multiplication output shape of two tensors. <a href="#adca241b012a5e00ddfcdc5a8db05a2a3">More...</a><br /></td></tr>
<tr class="separator:adca241b012a5e00ddfcdc5a8db05a2a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5076384fc9981ec1b497daab624a555b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a5076384fc9981ec1b497daab624a555b">compute_mm_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input0, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input1, const <a class="el" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">GEMMReshapeInfo</a> &amp;gemm_info)</td></tr>
<tr class="memdesc:a5076384fc9981ec1b497daab624a555b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the matrix multiplication output shape of two tensors. <a href="#a5076384fc9981ec1b497daab624a555b">More...</a><br /></td></tr>
<tr class="separator:a5076384fc9981ec1b497daab624a555b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a875efce77eabbdc40028c4fd288b68"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a5a875efce77eabbdc40028c4fd288b68">compute_mm_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input0, const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input1, const <a class="el" href="structarm__compute_1_1_g_e_m_m_kernel_info.xhtml">GEMMKernelInfo</a> &amp;gemm_info)</td></tr>
<tr class="memdesc:a5a875efce77eabbdc40028c4fd288b68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the matrix multiplication output shape of two tensors. <a href="#a5a875efce77eabbdc40028c4fd288b68">More...</a><br /></td></tr>
<tr class="separator:a5a875efce77eabbdc40028c4fd288b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d3b8af21d25d9e6871673565f9f7532"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a1d3b8af21d25d9e6871673565f9f7532">compute_output_stage_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, unsigned int gemm_3d_depth=1, bool batch_size_on_z=false)</td></tr>
<tr class="memdesc:a1d3b8af21d25d9e6871673565f9f7532"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the matrix multiplication output shape of two tensors. <a href="#a1d3b8af21d25d9e6871673565f9f7532">More...</a><br /></td></tr>
<tr class="separator:a1d3b8af21d25d9e6871673565f9f7532"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab288dc7ed664925c6f992b0e6aa3bc1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ab288dc7ed664925c6f992b0e6aa3bc1b">compute_strided_slice_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;starts, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;ends, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;strides, int32_t begin_mask, int32_t end_mask, int32_t shrink_axis_mask)</td></tr>
<tr class="memdesc:ab288dc7ed664925c6f992b0e6aa3bc1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the strided slice output shape of a tensor. <a href="#ab288dc7ed664925c6f992b0e6aa3bc1b">More...</a><br /></td></tr>
<tr class="separator:ab288dc7ed664925c6f992b0e6aa3bc1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a30c67d11c15378ffe67ca3c31e848917"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a30c67d11c15378ffe67ca3c31e848917">compute_slice_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;starts, const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;ends)</td></tr>
<tr class="memdesc:a30c67d11c15378ffe67ca3c31e848917"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the slice output shape of a tensor. <a href="#a30c67d11c15378ffe67ca3c31e848917">More...</a><br /></td></tr>
<tr class="separator:a30c67d11c15378ffe67ca3c31e848917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4d688e137d670d209b647ec37592a92"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ac4d688e137d670d209b647ec37592a92">compute_batch_to_space_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, const int block_x, const int block_y)</td></tr>
<tr class="memdesc:ac4d688e137d670d209b647ec37592a92"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the batch to space output shape of a tensor. <a href="#ac4d688e137d670d209b647ec37592a92">More...</a><br /></td></tr>
<tr class="separator:ac4d688e137d670d209b647ec37592a92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1d878f15b921e3f845ee9b683db359d7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a1d878f15b921e3f845ee9b683db359d7">compute_depth_to_space_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, int block)</td></tr>
<tr class="memdesc:a1d878f15b921e3f845ee9b683db359d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the depth to space output shape of a tensor. <a href="#a1d878f15b921e3f845ee9b683db359d7">More...</a><br /></td></tr>
<tr class="separator:a1d878f15b921e3f845ee9b683db359d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe10cfa0b480704109fd1a925301f58b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#abe10cfa0b480704109fd1a925301f58b">compute_split_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, unsigned int axis, unsigned int num_splits)</td></tr>
<tr class="memdesc:abe10cfa0b480704109fd1a925301f58b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the split output shape of a tensor. <a href="#abe10cfa0b480704109fd1a925301f58b">More...</a><br /></td></tr>
<tr class="separator:abe10cfa0b480704109fd1a925301f58b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a585529133e437dc5f935d33de17c4abb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a585529133e437dc5f935d33de17c4abb">compute_space_to_batch_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, const int block_x, const int block_y, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;padding_left, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;padding_right)</td></tr>
<tr class="memdesc:a585529133e437dc5f935d33de17c4abb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the space to batch output shape of a tensor. <a href="#a585529133e437dc5f935d33de17c4abb">More...</a><br /></td></tr>
<tr class="separator:a585529133e437dc5f935d33de17c4abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abd7ceb09e076b5e3374aeb1fab08fc84"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#abd7ceb09e076b5e3374aeb1fab08fc84">compute_space_to_depth_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *input, int32_t block_shape)</td></tr>
<tr class="memdesc:abd7ceb09e076b5e3374aeb1fab08fc84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the space to batch output shape of a tensor. <a href="#abd7ceb09e076b5e3374aeb1fab08fc84">More...</a><br /></td></tr>
<tr class="separator:abd7ceb09e076b5e3374aeb1fab08fc84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3f672f124e4228db364bb811e770226"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ae3f672f124e4228db364bb811e770226">compute_prior_box_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_prior_box_layer_info.xhtml">PriorBoxLayerInfo</a> &amp;info)</td></tr>
<tr class="memdesc:ae3f672f124e4228db364bb811e770226"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the prior box output shape of a tensor. <a href="#ae3f672f124e4228db364bb811e770226">More...</a><br /></td></tr>
<tr class="separator:ae3f672f124e4228db364bb811e770226"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e7f3187350db69156c1026860ace4e5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a4e7f3187350db69156c1026860ace4e5">compute_padded_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="namespacearm__compute.xhtml#ac1a1b012674e0f1de071a611391828ad">PaddingList</a> &amp;padding)</td></tr>
<tr class="memdesc:a4e7f3187350db69156c1026860ace4e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the padded shape of a tensor. <a href="#a4e7f3187350db69156c1026860ace4e5">More...</a><br /></td></tr>
<tr class="separator:a4e7f3187350db69156c1026860ace4e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a626cdfbacb377ee26462155d421717d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a626cdfbacb377ee26462155d421717d3">compute_tiled_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="namespacearm__compute.xhtml#afe9e10e5fdfd1e2665ac17c75c0cacd8">Multiples</a> &amp;multiples)</td></tr>
<tr class="memdesc:a626cdfbacb377ee26462155d421717d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the tiled shape of a tensor. <a href="#a626cdfbacb377ee26462155d421717d3">More...</a><br /></td></tr>
<tr class="separator:a626cdfbacb377ee26462155d421717d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b0f2e38b65473f68561e0598c3107ff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a0b0f2e38b65473f68561e0598c3107ff">compute_reduced_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input, unsigned int axis)</td></tr>
<tr class="memdesc:a0b0f2e38b65473f68561e0598c3107ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the reduced shape of a tensor given an axis. <a href="#a0b0f2e38b65473f68561e0598c3107ff">More...</a><br /></td></tr>
<tr class="separator:a0b0f2e38b65473f68561e0598c3107ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3173d90757ec6ff31441b55883eafbca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a3173d90757ec6ff31441b55883eafbca">compute_upsample_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;input, const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;info)</td></tr>
<tr class="memdesc:a3173d90757ec6ff31441b55883eafbca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the upsampled shape of a tensor. <a href="#a3173d90757ec6ff31441b55883eafbca">More...</a><br /></td></tr>
<tr class="separator:a3173d90757ec6ff31441b55883eafbca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb3f0c947411cfe1d8c5f67af2cad851"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:acb3f0c947411cfe1d8c5f67af2cad851"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#acb3f0c947411cfe1d8c5f67af2cad851">extract_shape</a> (T *data)</td></tr>
<tr class="memdesc:acb3f0c947411cfe1d8c5f67af2cad851"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the tensor shape. <a href="#acb3f0c947411cfe1d8c5f67af2cad851">More...</a><br /></td></tr>
<tr class="separator:acb3f0c947411cfe1d8c5f67af2cad851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af79493c6c07a3eb2b3a27712221b66b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#af79493c6c07a3eb2b3a27712221b66b8">extract_shape</a> (<a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *data)</td></tr>
<tr class="separator:af79493c6c07a3eb2b3a27712221b66b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4205a4be15a80494979ec1f19a66b21a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a4205a4be15a80494979ec1f19a66b21a">extract_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *data)</td></tr>
<tr class="separator:a4205a4be15a80494979ec1f19a66b21a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7f0e5491e0f43e371f7db047a03dd4c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ae7f0e5491e0f43e371f7db047a03dd4c">extract_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> *data)</td></tr>
<tr class="separator:ae7f0e5491e0f43e371f7db047a03dd4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29fee5f196a5154a39526b7b88594059"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a29fee5f196a5154a39526b7b88594059">extract_shape</a> (<a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> *data)</td></tr>
<tr class="separator:a29fee5f196a5154a39526b7b88594059"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acedb0877d41f2ae0591a2d4e84318140"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#acedb0877d41f2ae0591a2d4e84318140">calculate_unstack_shape</a> (<a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> input_shape, unsigned int axis)</td></tr>
<tr class="memdesc:acedb0877d41f2ae0591a2d4e84318140"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the unstack shape of a tensor. <a href="#acedb0877d41f2ae0591a2d4e84318140">More...</a><br /></td></tr>
<tr class="separator:acedb0877d41f2ae0591a2d4e84318140"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6100aeb494088632647c3e0d639c99ab"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a6100aeb494088632647c3e0d639c99ab"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a6100aeb494088632647c3e0d639c99ab">calculate_concatenate_shape</a> (const std::vector&lt; T * &gt; &amp;input, size_t axis)</td></tr>
<tr class="memdesc:a6100aeb494088632647c3e0d639c99ab"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the concatenate output shape of the concatenate operation along a single axis. <a href="#a6100aeb494088632647c3e0d639c99ab">More...</a><br /></td></tr>
<tr class="separator:a6100aeb494088632647c3e0d639c99ab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32c692ab35f40f9ce6e27e1f4016e921"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a32c692ab35f40f9ce6e27e1f4016e921">compute_stack_shape</a> (const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;a, unsigned int axis, unsigned int num_tensors)</td></tr>
<tr class="memdesc:a32c692ab35f40f9ce6e27e1f4016e921"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the stack output shape of a tensor. <a href="#a32c692ab35f40f9ce6e27e1f4016e921">More...</a><br /></td></tr>
<tr class="separator:a32c692ab35f40f9ce6e27e1f4016e921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6578c8df1088c90dfa0d1be6bca605d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#ae6578c8df1088c90dfa0d1be6bca605d">compute_gather_shape</a> (const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;input_shape, const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;indices_shape, uint32_t actual_axis)</td></tr>
<tr class="separator:ae6578c8df1088c90dfa0d1be6bca605d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="a6100aeb494088632647c3e0d639c99ab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6100aeb494088632647c3e0d639c99ab">&#9670;&nbsp;</a></span>calculate_concatenate_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::calculate_concatenate_shape </td>
<td>(</td>
<td class="paramtype">const std::vector&lt; T * &gt; &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>axis</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the concatenate output shape of the concatenate operation along a single axis. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information.">Vector</a> containing the shapes of the inputs </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>Axis along which to concatenate the input tensors</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01268">1268</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>&#160;{</div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span>&#160; TensorShape out_shape = <a class="code" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a29fee5f196a5154a39526b7b88594059">extract_shape</a>(input[0]);</div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>&#160;</div><div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>&#160;<span class="preprocessor">#if defined(ARM_COMPUTE_ASSERTS_ENABLED)</span></div><div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>&#160; <span class="comment">// All dimensions must match except the axis one</span></div><div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; <a class="code" href="namespacearm__compute.xhtml#a769d636d7a3c7c84579a5f477a18bc9d">MAX_DIMS</a>; ++i)</div><div class="line"><a name="l01275"></a><span class="lineno"> 1275</span>&#160; {</div><div class="line"><a name="l01276"></a><span class="lineno"> 1276</span>&#160; <span class="keywordflow">if</span>(i == <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>)</div><div class="line"><a name="l01277"></a><span class="lineno"> 1277</span>&#160; {</div><div class="line"><a name="l01278"></a><span class="lineno"> 1278</span>&#160; <span class="keywordflow">continue</span>;</div><div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>&#160; }</div><div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>&#160;</div><div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> &amp;tensor : input)</div><div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>&#160; {</div><div class="line"><a name="l01283"></a><span class="lineno"> 1283</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(tensor == <span class="keyword">nullptr</span>);</div><div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a> = <a class="code" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a29fee5f196a5154a39526b7b88594059">extract_shape</a>(tensor);</div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(out_shape[i] != <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>[i]);</div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>&#160; }</div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span>&#160; }</div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>&#160;<span class="preprocessor">#endif // defined(ARM_COMPUTE_ASSERTS_ENABLED)</span></div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>&#160;</div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>&#160; <span class="comment">// Calculate output shape</span></div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>&#160; <span class="keywordtype">size_t</span> new_size = 0;</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>&#160; <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> &amp;tensor : input)</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>&#160; {</div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a> = <a class="code" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a29fee5f196a5154a39526b7b88594059">extract_shape</a>(tensor);</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>&#160; new_size += <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">shape</a>[<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>];</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>&#160; }</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>&#160;</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>&#160; out_shape.set(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>, new_size);</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>&#160;</div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>&#160; <span class="keywordflow">return</span> out_shape;</div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a45cde9abb508c62d67c3bb2b9bf566a5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a45cde9abb508c62d67c3bb2b9bf566a5">arm_compute::test::validation::shape</a></div><div class="ttdeci">shape</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00097">AbsoluteDifference.cpp:97</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="namespacearm__compute_xhtml_a769d636d7a3c7c84579a5f477a18bc9d"><div class="ttname"><a href="namespacearm__compute.xhtml#a769d636d7a3c7c84579a5f477a18bc9d">arm_compute::MAX_DIMS</a></div><div class="ttdeci">constexpr size_t MAX_DIMS</div><div class="ttdoc">Constant value used to indicate maximum dimensions of a Window, TensorShape and Coordinates.</div><div class="ttdef"><b>Definition:</b> <a href="_dimensions_8h_source.xhtml#l00037">Dimensions.h:37</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1misc_1_1shape__calculator_xhtml_a29fee5f196a5154a39526b7b88594059"><div class="ttname"><a href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml#a29fee5f196a5154a39526b7b88594059">arm_compute::misc::shape_calculator::extract_shape</a></div><div class="ttdeci">TensorShape extract_shape(TensorShape *data)</div><div class="ttdef"><b>Definition:</b> <a href="_shape_calculator_8h_source.xhtml#l01241">ShapeCalculator.h:1241</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, <a class="el" href="_shape_calculator_8h_source.xhtml#l01222">extract_shape()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00037">arm_compute::MAX_DIMS</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00097">arm_compute::test::validation::shape</a>.</p>
<p class="reference">Referenced by <a class="el" href="_concatenate_layer_node_8cpp_source.xhtml#l00064">ConcatenateLayerNode::compute_output_descriptor()</a>, <a class="el" href="_g_c_concatenate_layer_8cpp_source.xhtml#l00043">GCConcatenateLayer::configure()</a>, <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00056">CLLSTMLayer::configure()</a>, <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00381">NELSTMLayer::validate()</a>, and <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00388">CLLSTMLayer::validate()</a>.</p>
</div>
</div>
<a id="acedb0877d41f2ae0591a2d4e84318140"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acedb0877d41f2ae0591a2d4e84318140">&#9670;&nbsp;</a></span>calculate_unstack_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::calculate_unstack_shape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a>&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>axis</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the unstack shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>Axis on which to perform the unstack operation</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01253">1253</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>&#160;{</div><div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a> &gt; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>.num_dimensions());</div><div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>.remove_dimension(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>);</div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>;</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>.</p>
</div>
</div>
<a id="ac4d688e137d670d209b647ec37592a92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4d688e137d670d209b647ec37592a92">&#9670;&nbsp;</a></span>compute_batch_to_space_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_batch_to_space_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>block_y</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the batch to space output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block_x</td><td>Block shape x value </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block_y</td><td>Block shape y value</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00998">998</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00999"></a><span class="lineno"> 999</span>&#160;{</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(block_x &lt;= 0 || block_y &lt;= 0);</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input-&gt;data_layout();</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_batch = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::BATCHES);</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, input-&gt;tensor_shape()[idx_width] * block_x);</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, input-&gt;tensor_shape()[idx_height] * block_y);</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_batch, input-&gt;tensor_shape()[idx_batch] / (block_x * block_y));</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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="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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a628bcf7e10fc1c2a984f379a1ec3393a">arm_compute::BATCHES</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_batch_to_space_layer_kernel_8cpp_source.xhtml#l00107">CLBatchToSpaceLayerKernel::configure()</a>, and <a class="el" href="_n_e_batch_to_space_layer_kernel_8cpp_source.xhtml#l00102">NEBatchToSpaceLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="a264e2e6d3ff632e90d450435fce66d54"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a264e2e6d3ff632e90d450435fce66d54">&#9670;&nbsp;</a></span>compute_col2im_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_col2im_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>convolved_dims</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>batch_size_on_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_groups</em> = <code>1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the Col2Im shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">convolved_dims</td><td>Convolved dimensions </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">batch_size_on_z</td><td>True if batch size is on z axis </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_groups</td><td>(Optional) Number of groups when performing a grouped convolution</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00359">359</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><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; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> == 0);</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(input.tensor_shape()[1] != (convolved_dims.area()));</div><div class="line"><a name="l00363"></a><span class="lineno"> 363</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>((<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> &gt; 1) &amp;&amp; input.tensor_shape()[2] != <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>);</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="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> channel_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>&#160;</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span>&#160; TensorShape col2im_shape{ input.tensor_shape() };</div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>&#160; <span class="comment">// If batches start on 3rd dimension shift dimensions right by 1 to retain upper tensor shape,</span></div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>&#160; <span class="comment">// as first three will be override by H,W,C data</span></div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>&#160; <span class="keywordflow">if</span>(batch_size_on_z &amp;&amp; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> == 1)</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span>&#160; {</div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>&#160; col2im_shape.shift_right(1);</div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>&#160; }</div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>&#160; col2im_shape.set(width_idx, convolved_dims.width);</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span>&#160; col2im_shape.set(height_idx, convolved_dims.height);</div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>&#160; col2im_shape.set(channel_idx, input.tensor_shape()[0] * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>);</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>&#160;</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>&#160; <span class="keywordflow">return</span> col2im_shape;</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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="namespacearm__compute_1_1test_1_1validation_xhtml_a2270b3e1d20651d2d8341c858c890830"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">arm_compute::test::validation::num_groups</a></div><div class="ttdeci">const unsigned int num_groups</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">Im2Col.cpp:148</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_size2_d_8h_source.xhtml#l00053">Size2D::area()</a>, <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">arm_compute::test::validation::num_groups</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00143">TensorShape::shift_right()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
</div>
</div>
<a id="ae270329cfe3dbab009b700318e8af8b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae270329cfe3dbab009b700318e8af8b4">&#9670;&nbsp;</a></span>compute_deconvolution_output_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_deconvolution_output_shape </td>
<td>(</td>
<td class="paramtype">const std::pair&lt; unsigned int, unsigned int &gt; &amp;&#160;</td>
<td class="paramname"><em>out_dims</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>weights</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the output shape of the deconvolution layer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">out_dims</td><td>Output x and y shape dimensions </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor shape</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00483">483</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00484"></a><span class="lineno"> 484</span>&#160;{</div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.tensor_shape() };</div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>&#160;</div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> channel_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> batch_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::BATCHES);</div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>&#160;</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>&#160; TensorShape out_shape{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a> };</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>&#160; out_shape.set(width_idx, out_dims.first);</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>&#160; out_shape.set(height_idx, out_dims.second);</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>&#160; out_shape.set(channel_idx, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[batch_idx]);</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>&#160; <span class="keywordflow">return</span> out_shape;</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ae8f0126f051c787279a8c9ee3c3a5d55"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">arm_compute::test::validation::weights_shape</a></div><div class="ttdeci">weights_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a64a08a9fec5aeee8650e7182b6d171d0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">arm_compute::test::validation::weights</a></div><div class="ttdeci">CLTensor weights</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">ConvolutionLayer.cpp:180</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a628bcf7e10fc1c2a984f379a1ec3393a">arm_compute::BATCHES</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">arm_compute::test::validation::weights</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::weights_shape</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_direct_deconvolution_layer_8cpp_source.xhtml#l00107">CLDirectDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00115">NEDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_o_n_2_deconvolution_layer_8cpp_source.xhtml#l00073">arm_compute::test::validation::DATA_TEST_CASE()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00057">NEDeconvolutionLayer::validate()</a>, <a class="el" href="_c_l_direct_deconvolution_layer_8cpp_source.xhtml#l00052">CLDirectDeconvolutionLayer::validate()</a>, and <a class="el" href="_c_l_g_e_m_m_deconvolution_layer_8cpp_source.xhtml#l00093">CLGEMMDeconvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a8234d85cf61e3eb6fa00c012bee6f5bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8234d85cf61e3eb6fa00c012bee6f5bf">&#9670;&nbsp;</a></span>compute_deconvolution_upsampled_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_deconvolution_upsampled_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>weights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>sx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>sy</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::pair&lt; unsigned int, unsigned int &gt; &amp;&#160;</td>
<td class="paramname"><em>out_dims</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int &amp;&#160;</td>
<td class="paramname"><em>padx</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int &amp;&#160;</td>
<td class="paramname"><em>pady</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the upsampled output shape used for deconvolution. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sx</td><td>Stride on x axis </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">sy</td><td>Stride on y axis </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">out_dims</td><td>Output shape dimensions </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">padx</td><td>Padding on x axis </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pady</td><td>Padding on y axis</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00451">451</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>&#160;{</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_w = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_h = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>&#160;</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span>&#160; <span class="comment">// Find the upsampled dimensions</span></div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_x = (input.dimension(idx_w) - 1) * sx + 1;</div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_y = (input.dimension(idx_h) - 1) * sy + 1;</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>&#160;</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>&#160; <span class="comment">// Find the padding needed for the convolution with stride 1 in order to match output shape</span></div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>&#160; padx = out_dims.first - (out_x - <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.dimension(idx_w) + 1);</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>&#160; pady = out_dims.second - (out_y - <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.dimension(idx_h) + 1);</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>&#160; out_x += padx;</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span>&#160; out_y += pady;</div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>&#160;</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span>&#160; TensorShape scale_out_shape(input.tensor_shape());</div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>&#160; scale_out_shape.set(idx_w, out_x);</div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>&#160; scale_out_shape.set(idx_h, out_y);</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>&#160;</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>&#160; <span class="keywordflow">return</span> scale_out_shape;</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a64a08a9fec5aeee8650e7182b6d171d0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">arm_compute::test::validation::weights</a></div><div class="ttdeci">CLTensor weights</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">ConvolutionLayer.cpp:180</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">arm_compute::test::validation::weights</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_direct_deconvolution_layer_8cpp_source.xhtml#l00107">CLDirectDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00115">NEDeconvolutionLayer::configure()</a>, <a class="el" href="_n_e_deconvolution_layer_8cpp_source.xhtml#l00057">NEDeconvolutionLayer::validate()</a>, and <a class="el" href="_c_l_direct_deconvolution_layer_8cpp_source.xhtml#l00052">CLDirectDeconvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a5d320d308c16b8ddda3c9d3f60fad79c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d320d308c16b8ddda3c9d3f60fad79c">&#9670;&nbsp;</a></span>compute_deep_convolution_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_deep_convolution_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>weights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>&#160;</td>
<td class="paramname"><em>conv_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the deep convolution shape output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_info</td><td>Contains padding and stride information</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00702">702</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>&#160;{</div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.tensor_shape() };</div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>&#160;</div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_channel = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span>&#160;</div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_width = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[idx_width];</div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_height = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[idx_height];</div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weights_width = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[idx_width];</div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weights_height = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[idx_height];</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weights_out_channel = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[3];</div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_width = 0;</div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_height = 0;</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>&#160; std::tie(output_width, output_height) = <a class="code" href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">scaled_dimensions</a>(input_width, input_height, weights_width, weights_height, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a>);</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>&#160;</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a> };</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, output_width);</div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, output_height);</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_channel, weights_out_channel);</div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>&#160;</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_abbe3399a66c35c3c353030cd0a84c936"><div class="ttname"><a href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">arm_compute::scaled_dimensions</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &amp;pad_stride_info, const Size2D &amp;dilation=Size2D(1U, 1U))</div><div class="ttdoc">Returns expected width and height of output scaled tensor depending on dimensions rounding mode.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00387">Utils.cpp:387</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a00525ff582f16038a1d3819aa44a23a3"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">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#l00599">Winograd.cpp:599</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ae8f0126f051c787279a8c9ee3c3a5d55"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">arm_compute::test::validation::weights_shape</a></div><div class="ttdeci">weights_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a64a08a9fec5aeee8650e7182b6d171d0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">arm_compute::test::validation::weights</a></div><div class="ttdeci">CLTensor weights</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">ConvolutionLayer.cpp:180</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00599">arm_compute::test::validation::conv_info</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="src_2core_2_utils_8cpp_source.xhtml#l00387">arm_compute::scaled_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">arm_compute::test::validation::weights</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::weights_shape</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_direct_convolution_layer_kernel_8cpp_source.xhtml#l01464">NEDirectConvolutionLayerKernel::configure()</a>, and <a class="el" href="_c_l_direct_convolution_layer_kernel_8cpp_source.xhtml#l00389">CLDirectConvolutionLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="a1d878f15b921e3f845ee9b683db359d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d878f15b921e3f845ee9b683db359d7">&#9670;&nbsp;</a></span>compute_depth_to_space_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_depth_to_space_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>block</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the depth to space output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block</td><td>Block shape value</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01022">1022</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;{</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(block &lt; 2);</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;</div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input-&gt;data_layout();</div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_channel = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, input-&gt;dimension(idx_width) * block);</div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, input-&gt;dimension(idx_height) * block);</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_channel, input-&gt;dimension(idx_channel) / (block * block));</div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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="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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_depth_to_space_layer_kernel_8cpp_source.xhtml#l00066">CLDepthToSpaceLayerKernel::configure()</a>, <a class="el" href="_c_l_space_to_depth_layer_kernel_8cpp_source.xhtml#l00067">CLSpaceToDepthLayerKernel::configure()</a>, and <a class="el" href="_n_e_depth_to_space_layer_kernel_8cpp_source.xhtml#l00070">NEDepthToSpaceLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="ac7147815227e7ba91814cfdcd38f23ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac7147815227e7ba91814cfdcd38f23ed">&#9670;&nbsp;</a></span>compute_depthwise_convolution_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_depthwise_convolution_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>weights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a>&#160;</td>
<td class="paramname"><em>conv_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>depth_multiplier</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>dilation</em> = <code><a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a>(1U,&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;1U)</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the depthwise convolution output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_info</td><td>Padding and stride information to use for the convolution. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">depth_multiplier</td><td>Multiplier to apply to the input's depth in order to retrieve the output's depth. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dilation</td><td>Dilation, in elements, across x and y. Defaults to (1, 1).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00410">410</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>&#160;{</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>&#160; <span class="keyword">const</span> TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.tensor_shape() };</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>&#160;</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00418"></a><span class="lineno"> 418</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00419"></a><span class="lineno"> 419</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> channel_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00420"></a><span class="lineno"> 420</span>&#160;</div><div class="line"><a name="l00421"></a><span class="lineno"> 421</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> weights_data_layout = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.data_layout();</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> weights_width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(weights_data_layout, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> weights_height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(weights_data_layout, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>&#160;</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_width = 0;</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_height = 0;</div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>&#160; std::tie(output_width, output_height) = <a class="code" href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">scaled_dimensions</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[width_idx], <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[height_idx],</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[weights_width_idx], <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>[weights_height_idx],</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad3fd4136244e42ad89b01c02b904336d">dilation</a>);</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span>&#160;</div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a> };</div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(width_idx, output_width);</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(height_idx, output_height);</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(channel_idx, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[channel_idx] * depth_multiplier);</div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>&#160;</div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad3fd4136244e42ad89b01c02b904336d"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad3fd4136244e42ad89b01c02b904336d">arm_compute::test::validation::dilation</a></div><div class="ttdeci">dilation</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_abbe3399a66c35c3c353030cd0a84c936"><div class="ttname"><a href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">arm_compute::scaled_dimensions</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &amp;pad_stride_info, const Size2D &amp;dilation=Size2D(1U, 1U))</div><div class="ttdoc">Returns expected width and height of output scaled tensor depending on dimensions rounding mode.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00387">Utils.cpp:387</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a00525ff582f16038a1d3819aa44a23a3"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">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#l00599">Winograd.cpp:599</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ae8f0126f051c787279a8c9ee3c3a5d55"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">arm_compute::test::validation::weights_shape</a></div><div class="ttdeci">weights_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a64a08a9fec5aeee8650e7182b6d171d0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">arm_compute::test::validation::weights</a></div><div class="ttdeci">CLTensor weights</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">ConvolutionLayer.cpp:180</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00599">arm_compute::test::validation::conv_info</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::dilation</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="src_2core_2_utils_8cpp_source.xhtml#l00387">arm_compute::scaled_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">arm_compute::test::validation::weights</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::weights_shape</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_g_c_depthwise_convolution_layer3x3_kernel_8cpp_source.xhtml#l00051">GCDepthwiseConvolutionLayer3x3Kernel::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00267">NEDepthwiseConvolutionAssemblyDispatch::configure()</a>, <a class="el" href="_c_l_depthwise_convolution_layer_8cpp_source.xhtml#l00256">CLDepthwiseConvolutionLayer::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00711">NEDepthwiseConvolutionLayer::configure()</a>, <a class="el" href="_n_e_depthwise_convolution_assembly_dispatch_8cpp_source.xhtml#l00320">NEDepthwiseConvolutionAssemblyDispatch::validate()</a>, <a class="el" href="_c_l_depthwise_convolution_layer_8cpp_source.xhtml#l00139">CLDepthwiseConvolutionLayer3x3::validate()</a>, <a class="el" href="_c_l_depthwise_convolution_layer_8cpp_source.xhtml#l00380">CLDepthwiseConvolutionLayer::validate()</a>, <a class="el" href="_n_e_depthwise_convolution_layer_8cpp_source.xhtml#l00858">NEDepthwiseConvolutionLayer::validate()</a>, and <a class="el" href="_n_e_depthwise_convolution_layer_native_kernel_8cpp_source.xhtml#l00221">arm_compute::validate_and_configure_window()</a>.</p>
</div>
</div>
<a id="a83efb6708574e67d13965bcd2059ad75"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a83efb6708574e67d13965bcd2059ad75">&#9670;&nbsp;</a></span>compute_flatten_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_flatten_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the flattened output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00551">551</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>&#160;{</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>&#160; <span class="comment">// The output shape will be the flatten version of the input (i.e. [ width * height * channels, num_batches, ... ] ). Used for FlattenLayer and FullyConnectedLayer.</span></div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>&#160;</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span>&#160;</div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.collapse(3);</div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>&#160;</div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00245">NEFullyConnectedLayer::validate()</a>, and <a class="el" href="_c_l_fully_connected_layer_8cpp_source.xhtml#l00249">CLFullyConnectedLayer::validate()</a>.</p>
</div>
</div>
<a id="ae6578c8df1088c90dfa0d1be6bca605d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6578c8df1088c90dfa0d1be6bca605d">&#9670;&nbsp;</a></span>compute_gather_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_gather_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>indices_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint32_t&#160;</td>
<td class="paramname"><em>actual_axis</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01332">1332</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01333"></a><span class="lineno"> 1333</span>&#160;{</div><div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(indices_shape.num_dimensions() &gt; 1);</div><div class="line"><a name="l01335"></a><span class="lineno"> 1335</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>.num_dimensions() &gt; 4);</div><div class="line"><a name="l01336"></a><span class="lineno"> 1336</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(actual_axis &gt;= <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>.num_dimensions());</div><div class="line"><a name="l01337"></a><span class="lineno"> 1337</span>&#160;</div><div class="line"><a name="l01338"></a><span class="lineno"> 1338</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a> = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>;</div><div class="line"><a name="l01339"></a><span class="lineno"> 1339</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[actual_axis] = indices_shape[0];</div><div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>&#160;</div><div class="line"><a name="l01341"></a><span class="lineno"> 1341</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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="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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00122">Dimensions&lt; T &gt;::num_dimensions()</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_gather_kernel_8cpp_source.xhtml#l00107">NEGatherKernel::configure()</a>, <a class="el" href="reference_2_gather_8cpp_source.xhtml#l00040">arm_compute::test::validation::reference::gather()</a>, and <a class="el" href="_n_e_gather_kernel_8cpp_source.xhtml#l00166">NEGatherKernel::validate()</a>.</p>
</div>
</div>
<a id="a8a9286d053e9f3a958064e4f3cdd02f7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8a9286d053e9f3a958064e4f3cdd02f7">&#9670;&nbsp;</a></span>compute_im2col_conv_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_im2col_conv_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>kernel_dims</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_pad_stride_info.xhtml">PadStrideInfo</a> &amp;&#160;</td>
<td class="paramname"><em>conv_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>has_bias</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>dilation</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>batch_size_on_z</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_groups</em> = <code>1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the im2col output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">kernel_dims</td><td>The kernel dimensions (width and height). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_info</td><td>Contains padding and stride information </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">has_bias</td><td>In case biases are provided expands the matrix with 1 </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">dilation</td><td>Dilation, in elements, across x and y </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">batch_size_on_z</td><td>True if batch size is on z axis </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_groups</td><td>(Optional) Number of groups when performing a grouped convolution</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00513">513</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>&#160;{</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>&#160; <span class="comment">// The output shape will be the 3D shape [ out_channels * kernel_area, num_elems_per_out_channel, batches ] if batch_size_on_z == true</span></div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>&#160; <span class="comment">// or the 4D shape [ out_channels * kernel_area / num_groups, num_elems_per_out_channel, num_groups, batches ] if batch_size_on_z == false</span></div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span>&#160;</div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> == 0);</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> &gt; 1 &amp;&amp; input-&gt;data_layout() != DataLayout::NCHW);</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> &gt; 1 &amp;&amp; batch_size_on_z);</div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>&#160;</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>&#160;</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input-&gt;data_layout();</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> channel_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>&#160;</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span>&#160; std::pair&lt;unsigned int, unsigned int&gt; out_dims = <a class="code" href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">scaled_dimensions</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[width_idx], <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[height_idx], kernel_dims.width, kernel_dims.height, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ad3fd4136244e42ad89b01c02b904336d">dilation</a>);</div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, (<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[channel_idx] / <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> * kernel_dims.area() + (<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a9aeced5a5128f60a31ea3e327a45ee21">has_bias</a> ? 1 : 0))); <span class="comment">// NOLINT</span></div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, (out_dims.first * out_dims.second));</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span>&#160; <span class="keywordflow">if</span>(batch_size_on_z &amp;&amp; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.num_dimensions() &gt;= 3)</div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>&#160; {</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.remove_dimension(2);</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>&#160; }</div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span>&#160; {</div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>);</div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>&#160; }</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>&#160;</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ad3fd4136244e42ad89b01c02b904336d"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ad3fd4136244e42ad89b01c02b904336d">arm_compute::test::validation::dilation</a></div><div class="ttdeci">dilation</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_abbe3399a66c35c3c353030cd0a84c936"><div class="ttname"><a href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">arm_compute::scaled_dimensions</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &amp;pad_stride_info, const Size2D &amp;dilation=Size2D(1U, 1U))</div><div class="ttdoc">Returns expected width and height of output scaled tensor depending on dimensions rounding mode.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00387">Utils.cpp:387</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a00525ff582f16038a1d3819aa44a23a3"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">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#l00599">Winograd.cpp:599</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="namespacearm__compute_1_1test_1_1validation_xhtml_a2270b3e1d20651d2d8341c858c890830"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">arm_compute::test::validation::num_groups</a></div><div class="ttdeci">const unsigned int num_groups</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">Im2Col.cpp:148</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a9aeced5a5128f60a31ea3e327a45ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a9aeced5a5128f60a31ea3e327a45ee21">arm_compute::test::validation::has_bias</a></div><div class="ttdeci">const bool has_bias</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00147">Im2Col.cpp:147</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_size2_d_8h_source.xhtml#l00053">Size2D::area()</a>, <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00599">arm_compute::test::validation::conv_info</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::dilation</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00147">arm_compute::test::validation::has_bias</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0a6b99f356fe3b30a2a850b5ea897c289f">arm_compute::NCHW</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">arm_compute::test::validation::num_groups</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="src_2core_2_utils_8cpp_source.xhtml#l00387">arm_compute::scaled_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00373">CLGEMMConvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a8d52adbbcd2c53f837c96b5a3d15c4fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d52adbbcd2c53f837c96b5a3d15c4fb">&#9670;&nbsp;</a></span>compute_interleaved_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_interleaved_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>mult_interleave4x4_height</em> = <code>1</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>reinterpret_input_as_3d</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the interleaved shape of an input tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mult_interleave4x4_height</td><td>(Optional) Interleave4x4 height </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reinterpret_input_as_3d</td><td>(Optional) Set to true if the input need to be interpreted as 3d</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00224">224</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;{</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; <span class="comment">// The interleaved output matrix will have the following shape: [ a_height * W, ceil(a_width / W) ] where W = 4 * mult_interleave4x4_height</span></div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(mult_interleave4x4_height &lt; 1);</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> interleave_width = 4 * mult_interleave4x4_height;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; TensorShape shape_interleaved_a{ a.tensor_shape() };</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160; shape_interleaved_a.set(0, a.dimension(0) * interleave_width);</div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordflow">if</span>(reinterpret_input_as_3d)</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160; {</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> M = a.dimension(1) * a.dimension(2);</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height = std::ceil(M / static_cast&lt;float&gt;(interleave_width));</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>&#160; shape_interleaved_a.set(1, height);</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>&#160;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>&#160; <span class="comment">// When the data format is NHWC and the shapes are Nx1x1</span></div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>&#160; <span class="comment">// the tensor shape num_dimensions is automatically set to 1 instead of 3.</span></div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>&#160; <span class="comment">// To avoid failures by removing a dimension that doesn&#39;t exist</span></div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span>&#160; <span class="comment">// check if the number of dimensions is greater than 2.</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160; <span class="keywordflow">if</span>(shape_interleaved_a.num_dimensions() &gt; 2)</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; {</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; shape_interleaved_a.remove_dimension(2);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160; }</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; }</div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; {</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160; shape_interleaved_a.set(1, std::ceil(a.dimension(1) / static_cast&lt;float&gt;(interleave_width)));</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; }</div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160; <span class="keywordflow">return</span> shape_interleaved_a;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160;}</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><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_g_e_m_m_interleave4x4_kernel_8cpp_source.xhtml#l00179">NEGEMMInterleave4x4Kernel::configure()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>, and <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00139">NEGEMM::validate()</a>.</p>
</div>
</div>
<a id="a389f89ab5121dad0906d0b7324fbf73d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a389f89ab5121dad0906d0b7324fbf73d">&#9670;&nbsp;</a></span>compute_lhs_reshaped_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_lhs_reshaped_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_g_e_m_m_l_h_s_matrix_info.xhtml">GEMMLHSMatrixInfo</a> &amp;&#160;</td>
<td class="paramname"><em>lhs_info</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>reinterpret_input_as_3d</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the Left Hand Side matrix reshaped shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">lhs_info</td><td>Left Hand Side matrix information </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reinterpret_input_as_3d</td><td>(Optional) Set to true if the input need to be interpreted as 3d</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00144">144</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160;{</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(lhs_info.m0 == 0);</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(lhs_info.k0 == 0);</div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(lhs_info.v0 == 0);</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160;</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; <span class="comment">// Input width/height</span></div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_width = a.dimension(0);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_height = reinterpret_input_as_3d ? a.dimension(1) * a.dimension(2) : a.dimension(1);</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>&#160; <span class="comment">// Number of horizontal/vertical blocks in the input tensor</span></div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_horiz_blocks = std::ceil(input_width / static_cast&lt;float&gt;(lhs_info.k0));</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_vert_blocks = std::ceil(input_height / static_cast&lt;float&gt;(lhs_info.m0));</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>&#160;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>&#160; <span class="comment">// Block size</span></div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> block_size = lhs_info.m0 * lhs_info.k0;</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160; <span class="comment">// Output width/height</span></div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_width = block_size * num_horiz_blocks * lhs_info.v0;</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_height = std::ceil(num_vert_blocks / static_cast&lt;float&gt;(lhs_info.v0));</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; TensorShape lhs_shape{ a.tensor_shape() };</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160; lhs_shape.set(0, output_width);</div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160; lhs_shape.set(1, output_height);</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160;</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; <span class="keywordflow">if</span>((reinterpret_input_as_3d) &amp;&amp; (lhs_shape.num_dimensions() &gt; 2))</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; {</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; <span class="comment">// When the data format is NHWC and the shapes are Nx1x1</span></div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; <span class="comment">// the tensor shape num_dimensions is automatically set to 1 instead of 3.</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; <span class="comment">// To avoid failures by removing a dimension that doesn&#39;t exist</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; <span class="comment">// check if the number of dimensions is greater than 2.</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; lhs_shape.remove_dimension(2);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160; }</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160;</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; <span class="keywordflow">return</span> lhs_shape;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160;}</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><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01859">GEMMLHSMatrixInfo::k0</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01858">GEMMLHSMatrixInfo::m0</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00110">TensorShape::remove_dimension()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01860">GEMMLHSMatrixInfo::v0</a>.</p>
</div>
</div>
<a id="a1b843e3850ed7324d11f77882cc597ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1b843e3850ed7324d11f77882cc597ae">&#9670;&nbsp;</a></span>compute_min_max_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_min_max_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the min/max shape output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00734">734</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>&#160;{</div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(Window::DimX, 2);</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.remove_dimension(1);</div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.remove_dimension(1);</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>&#160;</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="adca241b012a5e00ddfcdc5a8db05a2a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adca241b012a5e00ddfcdc5a8db05a2a3">&#9670;&nbsp;</a></span>compute_mm_shape() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_mm_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>is_interleaved_transposed</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">GEMMReshapeInfo</a> &amp;&#160;</td>
<td class="paramname"><em>reshape_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the matrix multiplication output shape of two tensors. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input0</td><td>First input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input1</td><td>Second input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">is_interleaved_transposed</td><td>True if the input is interleaved transposed </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">reshape_info</td><td>GEMM reshape info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00822">822</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00823"></a><span class="lineno"> 823</span>&#160;{</div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(input0.num_dimensions() &gt; 4, <span class="stringliteral">&quot;The number of dimensions for the matrix A must be &lt;= 4&quot;</span>);</div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(is_interleaved_transposed &amp;&amp; reshape_info.reinterpret_input_as_3d(), <span class="stringliteral">&quot;The first input tensor cannot be reinterpreted as 3D if is_interleaved_transposed is true&quot;</span>);</div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>&#160;</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_input_as_3d = reshape_info.reinterpret_input_as_3d();</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_output_as_3d = reshape_info.depth_output_gemm3d() != 0;</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> depth_output_gemm3d = reinterpret_output_as_3d ? reshape_info.depth_output_gemm3d() : 1;</div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> m = reshape_info.reinterpret_input_as_3d() ? input0.dimension(1) * input0.dimension(2) : input0.dimension(1);</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span>&#160;</div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>&#160; <span class="comment">// If the output of GEMM has to be reinterpreted as 3D, the number of input0 rows (M) is obtained collapsing the second and third</span></div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>&#160; <span class="comment">// dimension of the output tensor</span></div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> dim0 = is_interleaved_transposed ? reshape_info.n() : input1.dimension(0);</div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> dim1 = is_interleaved_transposed ? reshape_info.m() / depth_output_gemm3d : m / depth_output_gemm3d;</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> dim2 = reinterpret_input_as_3d ? input0.tensor_shape()[3] : input0.tensor_shape()[2];</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> dim3 = reinterpret_input_as_3d ? 1 : input0.tensor_shape()[3];</div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>&#160;</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input0.tensor_shape() };</div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>&#160;</div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, dim0);</div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, dim1);</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, reinterpret_output_as_3d ? depth_output_gemm3d : dim2);</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(3, reinterpret_output_as_3d ? dim2 : dim3);</div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(4, reinterpret_output_as_3d ? dim3 : 1);</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>&#160;</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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 -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01797">GEMMReshapeInfo::depth_output_gemm3d()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01754">GEMMReshapeInfo::m()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01762">GEMMReshapeInfo::n()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">ITensorInfo::num_dimensions()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01805">GEMMReshapeInfo::reinterpret_input_as_3d()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00139">NEGEMM::validate()</a>, and <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00237">CLGEMMLowpMatrixMultiplyCore::validate()</a>.</p>
</div>
</div>
<a id="a5076384fc9981ec1b497daab624a555b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5076384fc9981ec1b497daab624a555b">&#9670;&nbsp;</a></span>compute_mm_shape() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_mm_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml">GEMMReshapeInfo</a> &amp;&#160;</td>
<td class="paramname"><em>gemm_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the matrix multiplication output shape of two tensors. </p>
<dl class="section note"><dt>Note</dt><dd>Deprecated. Remove when <a class="el" href="classarm__compute_1_1_g_e_m_m_reshape_info.xhtml" title="GEMM reshape information class.">GEMMReshapeInfo</a> is not used anymore by any other kernels</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input0</td><td>First input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input1</td><td>Second input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gemm_info</td><td>GEMM reshape info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00860">860</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>&#160;{</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(input0.num_dimensions() &gt; 4, <span class="stringliteral">&quot;The number of dimensions for the matrix A must be &lt;= 4&quot;</span>);</div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>&#160;</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_input_as_3d = gemm_info.reinterpret_input_as_3d();</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_output_as_3d = gemm_info.depth_output_gemm3d() != 0;</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> depth_output_gemm3d = reinterpret_output_as_3d ? gemm_info.depth_output_gemm3d() : 1;</div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span>&#160;</div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input0.tensor_shape() };</div><div class="line"><a name="l00869"></a><span class="lineno"> 869</span>&#160;</div><div class="line"><a name="l00870"></a><span class="lineno"> 870</span>&#160; <span class="keywordflow">if</span>(!reinterpret_input_as_3d &amp;&amp; !reinterpret_output_as_3d)</div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>&#160; {</div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, gemm_info.n());</div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, gemm_info.m());</div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span>&#160; }</div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span>&#160; {</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span>&#160; <span class="comment">// If the output of GEMM has to be reinterpreted as 3D, the number of input0 rows (M) is obtained collapsing the second and third</span></div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span>&#160; <span class="comment">// dimension of the output tensor</span></div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> batch_size = reinterpret_input_as_3d ? input0.tensor_shape()[3] : input0.tensor_shape()[2];</div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, gemm_info.n());</div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, gemm_info.m() / depth_output_gemm3d);</div><div class="line"><a name="l00882"></a><span class="lineno"> 882</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, reinterpret_output_as_3d ? depth_output_gemm3d : batch_size);</div><div class="line"><a name="l00883"></a><span class="lineno"> 883</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(3, reinterpret_output_as_3d ? batch_size : 1);</div><div class="line"><a name="l00884"></a><span class="lineno"> 884</span>&#160; }</div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span>&#160;</div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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 -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01797">GEMMReshapeInfo::depth_output_gemm3d()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01754">GEMMReshapeInfo::m()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01762">GEMMReshapeInfo::n()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">ITensorInfo::num_dimensions()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01805">GEMMReshapeInfo::reinterpret_input_as_3d()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="a5a875efce77eabbdc40028c4fd288b68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a875efce77eabbdc40028c4fd288b68">&#9670;&nbsp;</a></span>compute_mm_shape() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_mm_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input0</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input1</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_g_e_m_m_kernel_info.xhtml">GEMMKernelInfo</a> &amp;&#160;</td>
<td class="paramname"><em>gemm_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the matrix multiplication output shape of two tensors. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input0</td><td>First input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">input1</td><td>Second input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gemm_info</td><td>GEMM kernel info used to retrieve the original dimensions of the input matrices</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00897">897</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00898"></a><span class="lineno"> 898</span>&#160;{</div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>(input0.num_dimensions() &gt; 4, <span class="stringliteral">&quot;The number of dimensions for the matrix A must be &lt;= 4&quot;</span>);</div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span>&#160;</div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_input_as_3d = gemm_info.reinterpret_input_as_3d;</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> reinterpret_output_as_3d = gemm_info.depth_output_gemm3d != 0;</div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> depth_output_gemm3d = reinterpret_output_as_3d ? gemm_info.depth_output_gemm3d : 1;</div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span>&#160;</div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input0.tensor_shape() };</div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span>&#160;</div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span>&#160; <span class="keywordflow">if</span>(!reinterpret_input_as_3d &amp;&amp; !reinterpret_output_as_3d)</div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>&#160; {</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, gemm_info.n);</div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, gemm_info.m);</div><div class="line"><a name="l00911"></a><span class="lineno"> 911</span>&#160; }</div><div class="line"><a name="l00912"></a><span class="lineno"> 912</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00913"></a><span class="lineno"> 913</span>&#160; {</div><div class="line"><a name="l00914"></a><span class="lineno"> 914</span>&#160; <span class="comment">// If the output of GEMM has to be reinterpreted as 3D, the number of input0 rows (M) is obtained collapsing the second and third</span></div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span>&#160; <span class="comment">// dimension of the output tensor</span></div><div class="line"><a name="l00916"></a><span class="lineno"> 916</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> batch_size = reinterpret_input_as_3d ? input0.tensor_shape()[3] : input0.tensor_shape()[2];</div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, gemm_info.n);</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, gemm_info.m / depth_output_gemm3d);</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, reinterpret_output_as_3d ? depth_output_gemm3d : batch_size);</div><div class="line"><a name="l00920"></a><span class="lineno"> 920</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(3, reinterpret_output_as_3d ? batch_size : 1);</div><div class="line"><a name="l00921"></a><span class="lineno"> 921</span>&#160; }</div><div class="line"><a name="l00922"></a><span class="lineno"> 922</span>&#160;</div><div class="line"><a name="l00923"></a><span class="lineno"> 923</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00924"></a><span class="lineno"> 924</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</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 -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="_kernel_descriptors_8h_source.xhtml#l00060">GEMMKernelInfo::depth_output_gemm3d</a>, <a class="el" href="_kernel_descriptors_8h_source.xhtml#l00057">GEMMKernelInfo::m</a>, <a class="el" href="_kernel_descriptors_8h_source.xhtml#l00058">GEMMKernelInfo::n</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">ITensorInfo::num_dimensions()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="_kernel_descriptors_8h_source.xhtml#l00061">GEMMKernelInfo::reinterpret_input_as_3d</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="a1d3b8af21d25d9e6871673565f9f7532"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1d3b8af21d25d9e6871673565f9f7532">&#9670;&nbsp;</a></span>compute_output_stage_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_output_stage_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>gemm_3d_depth</em> = <code>1</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>batch_size_on_z</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the matrix multiplication output shape of two tensors. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">gemm_3d_depth</td><td>(Optional) GEMM 3d depth </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">batch_size_on_z</td><td>(Optional) True if batch size is on z axis</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00934">934</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00935"></a><span class="lineno"> 935</span>&#160;{</div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(input.data_layout() != DataLayout::NHWC &amp;&amp; gemm_3d_depth &gt; 1);</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>&#160;</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a> = input.tensor_shape();</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>&#160; <span class="keywordflow">if</span>(gemm_3d_depth &gt; 1)</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>&#160; {</div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>&#160; <span class="keywordflow">if</span>(batch_size_on_z)</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>&#160; {</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.shift_right(1);</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>&#160; }</div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, input.tensor_shape().x());</div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, input.tensor_shape().y() / gemm_3d_depth);</div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, gemm_3d_depth);</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>&#160; }</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>&#160;</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span>&#160;}</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="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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">arm_compute::NHWC</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</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>
<a id="a4e7f3187350db69156c1026860ace4e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e7f3187350db69156c1026860ace4e5">&#9670;&nbsp;</a></span>compute_padded_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_padded_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacearm__compute.xhtml#ac1a1b012674e0f1de071a611391828ad">PaddingList</a> &amp;&#160;</td>
<td class="paramname"><em>padding</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the padded shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">padding</td><td>Paddings list</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01149">1149</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>&#160;{</div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>&#160; TensorShape padded_shape = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>;</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> dim = 0; dim &lt; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a735a025fce26c1ef147b54426df18181">padding</a>.size(); ++dim)</div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>&#160; {</div><div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> &amp;padding_pair = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a735a025fce26c1ef147b54426df18181">padding</a>[dim];</div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>&#160; <span class="keyword">const</span> uint32_t shape_on_index = (padded_shape.num_dimensions() &lt;= dim) ? 1 : <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[dim];</div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>&#160; padded_shape.set(dim, padding_pair.first + shape_on_index + padding_pair.second);</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>&#160; }</div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>&#160; <span class="keywordflow">return</span> padded_shape;</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a735a025fce26c1ef147b54426df18181"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a735a025fce26c1ef147b54426df18181">arm_compute::test::validation::padding</a></div><div class="ttdeci">const PaddingSize padding</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00113">AbsoluteDifference.cpp:113</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00122">Dimensions&lt; T &gt;::num_dimensions()</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00113">arm_compute::test::validation::padding</a>, and <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_pad_layer_8cpp_source.xhtml#l00201">NEPadLayer::configure()</a>, <a class="el" href="_c_l_pad_layer_8cpp_source.xhtml#l00164">CLPadLayer::configure()</a>, <a class="el" href="reference_2_pad_layer_8cpp_source.xhtml#l00039">arm_compute::test::validation::reference::pad_layer()</a>, <a class="el" href="_n_e_pad_layer_8cpp_source.xhtml#l00240">NEPadLayer::validate()</a>, and <a class="el" href="_c_l_pad_layer_8cpp_source.xhtml#l00211">CLPadLayer::validate()</a>.</p>
</div>
</div>
<a id="a593fb7ecc281425b190cd6f20164b1a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a593fb7ecc281425b190cd6f20164b1a3">&#9670;&nbsp;</a></span>compute_permutation_output_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_permutation_output_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacearm__compute.xhtml#a33e65be485104e2e9e69fca551d6f492">PermutationVector</a> &amp;&#160;</td>
<td class="paramname"><em>perm</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the permuted shape of an input given a permutation vector. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">perm</td><td>Permutation vector</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00072">72</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a> = input.tensor_shape();</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; <a class="code" href="namespacearm__compute.xhtml#a21c3e11887f3acf9284ca763372c7da0">permute</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>, perm);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_a21c3e11887f3acf9284ca763372c7da0"><div class="ttname"><a href="namespacearm__compute.xhtml#a21c3e11887f3acf9284ca763372c7da0">arm_compute::permute</a></div><div class="ttdeci">void permute(Dimensions&lt; T &gt; &amp;dimensions, const PermutationVector &amp;perm)</div><div class="ttdoc">Permutes given Dimensions according to a permutation vector.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00570">Helpers.h:570</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00570">arm_compute::permute()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_p_p_permute_kernel_8cpp_source.xhtml#l00108">CPPPermuteKernel::configure()</a>, and <a class="el" href="_n_e_permute_kernel_8cpp_source.xhtml#l00242">NEPermuteKernel::configure()</a>.</p>
</div>
</div>
<a id="ad242bedd6845b8fc13ade41cfc062c83"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad242bedd6845b8fc13ade41cfc062c83">&#9670;&nbsp;</a></span>compute_pool_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_pool_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_pooling_layer_info.xhtml">PoolingLayerInfo</a>&#160;</td>
<td class="paramname"><em>pool_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the output pool shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pool_info</td><td>Pooling layer info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00751">751</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00752"></a><span class="lineno"> 752</span>&#160;{</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pooled_w = 0;</div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pooled_h = 0;</div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>&#160;</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>&#160;</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span>&#160; <span class="keyword">const</span> <span class="keywordtype">bool</span> is_global_pooling = pool_info.is_global_pooling();</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pool_size_x = is_global_pooling ? <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_width] : pool_info.pool_size().width;</div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pool_size_y = is_global_pooling ? <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_height] : pool_info.pool_size().height;</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>&#160;</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>&#160; std::tie(pooled_w, pooled_h) = <a class="code" href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">scaled_dimensions</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_width],</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_height],</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>&#160; pool_size_x,</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>&#160; pool_size_y,</div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>&#160; pool_info.pad_stride_info());</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>&#160;</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, pooled_w);</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, pooled_h);</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>&#160;</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>&#160;}</div><div class="ttc" id="namespacearm__compute_xhtml_abbe3399a66c35c3c353030cd0a84c936"><div class="ttname"><a href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">arm_compute::scaled_dimensions</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &amp;pad_stride_info, const Size2D &amp;dilation=Size2D(1U, 1U))</div><div class="ttdoc">Returns expected width and height of output scaled tensor depending on dimensions rounding mode.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00387">Utils.cpp:387</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01262">PoolingLayerInfo::is_global_pooling()</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01252">PoolingLayerInfo::pad_stride_info()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01247">PoolingLayerInfo::pool_size()</a>, <a class="el" href="src_2core_2_utils_8cpp_source.xhtml#l00387">arm_compute::scaled_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="validation_2reference_2_pooling_layer_8cpp_source.xhtml#l00041">arm_compute::test::validation::reference::pooling_layer()</a>.</p>
</div>
</div>
<a id="ae3f672f124e4228db364bb811e770226"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3f672f124e4228db364bb811e770226">&#9670;&nbsp;</a></span>compute_prior_box_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_prior_box_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_prior_box_layer_info.xhtml">PriorBoxLayerInfo</a> &amp;&#160;</td>
<td class="paramname"><em>info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the prior box output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>PriorBoxLayer info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01128">1128</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>&#160;{</div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span>&#160; <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_w = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_h = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01133"></a><span class="lineno"> 1133</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> num_priors = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.aspect_ratios().size() * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.min_sizes().size() + <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.max_sizes().size();</div><div class="line"><a name="l01134"></a><span class="lineno"> 1134</span>&#160;</div><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{};</div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, input.dimension(idx_w) * input.dimension(idx_h) * num_priors * 4);</div><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, 2);</div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>&#160;</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::info</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
</div>
</div>
<a id="a0b0f2e38b65473f68561e0598c3107ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b0f2e38b65473f68561e0598c3107ff">&#9670;&nbsp;</a></span>compute_reduced_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_reduced_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>axis</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the reduced shape of a tensor given an axis. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>Axis on which to perform reduction</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01185">1185</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span>&#160;{</div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input };</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>, 1);</div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>&#160;</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>.</p>
</div>
</div>
<a id="a60ce6c017f70d978b48b101ce314969e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60ce6c017f70d978b48b101ce314969e">&#9670;&nbsp;</a></span>compute_reductionA_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_reductionA_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>b</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the reductionA shape used in GEMMLowp. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00321">321</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><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; TensorShape shape_vector_sum_col{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.tensor_shape() };</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span>&#160; <span class="keywordflow">if</span>(shape_vector_sum_col.num_dimensions() &gt; 1)</div><div class="line"><a name="l00325"></a><span class="lineno"> 325</span>&#160; {</div><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160; shape_vector_sum_col.remove_dimension(1);</div><div class="line"><a name="l00327"></a><span class="lineno"> 327</span>&#160; }</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; <span class="keywordflow">return</span> shape_vector_sum_col;</div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00075">CLGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00237">CLGEMMLowpMatrixMultiplyCore::validate()</a>, and <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00224">NEGEMMLowpMatrixMultiplyCore::validate()</a>.</p>
</div>
</div>
<a id="a69f9b3191aafc4905f9d029ff9d48fea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69f9b3191aafc4905f9d029ff9d48fea">&#9670;&nbsp;</a></span>compute_reductionB_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_reductionB_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>a</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the reductionB shape used in GEMMLowp. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00338">338</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00339"></a><span class="lineno"> 339</span>&#160;{</div><div class="line"><a name="l00340"></a><span class="lineno"> 340</span>&#160; TensorShape shape_vector_sum_row{ a.tensor_shape() };</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>&#160; shape_vector_sum_row.set(Window::DimX, a.dimension(1));</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>&#160; <span class="keywordflow">if</span>(shape_vector_sum_row.num_dimensions() &gt; 1)</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>&#160; {</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>&#160; shape_vector_sum_row.remove_dimension(1);</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>&#160; }</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>&#160; <span class="keywordflow">return</span> shape_vector_sum_row;</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>&#160;}</div></div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00110">TensorShape::remove_dimension()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00075">CLGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>, <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00237">CLGEMMLowpMatrixMultiplyCore::validate()</a>, and <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00224">NEGEMMLowpMatrixMultiplyCore::validate()</a>.</p>
</div>
</div>
<a id="afbc83cd4145d161da4c026e1f5743e1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbc83cd4145d161da4c026e1f5743e1d">&#9670;&nbsp;</a></span>compute_reorg_output_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_reorg_output_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>stride</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the output shape of the reorg layer given a stride. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">stride</td><td>Stride</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00086">86</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;{</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_channel = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(stride &lt;= 0);</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((input.tensor_shape()[idx_width] % stride != 0), <span class="stringliteral">&quot;The width of the input tensor must be a multiple of stride&quot;</span>);</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <a class="code" href="_error_8h.xhtml#a5bbdcf574d3f5e412fa6a1117911e67b">ARM_COMPUTE_ERROR_ON_MSG</a>((input.tensor_shape()[idx_height] % stride != 0), <span class="stringliteral">&quot;The height of the input tensor must be a multiple of stride&quot;</span>);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_width] / stride);</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_height] / stride);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_channel, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>[idx_channel] * stride * stride);</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160;}</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="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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</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 -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_error_8h_source.xhtml#l00328">ARM_COMPUTE_ERROR_ON_MSG</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_reorg_layer_kernel_8cpp_source.xhtml#l00076">CLReorgLayerKernel::configure()</a>, <a class="el" href="_n_e_reorg_layer_kernel_8cpp_source.xhtml#l00075">NEReorgLayerKernel::configure()</a>, and <a class="el" href="reference_2_reorg_layer_8cpp_source.xhtml#l00038">arm_compute::test::validation::reference::reorg_layer()</a>.</p>
</div>
</div>
<a id="a3f10bc0f3e2a0126ce8c26e3d6a8fb96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f10bc0f3e2a0126ce8c26e3d6a8fb96">&#9670;&nbsp;</a></span>compute_reshaped_depthwise_weights_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_reshaped_depthwise_weights_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_depthwise_convolution_reshape_info.xhtml">DepthwiseConvolutionReshapeInfo</a> &amp;&#160;</td>
<td class="paramname"><em>info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the reshaped shape of the weights to use in depthwise convolution. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>Depthwise convolution information to be used for reshaping.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00261">261</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160;{</div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; <span class="keyword">const</span> <span class="keyword">auto</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>{};</div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160;</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> width_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> height_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> channel_idx = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00269"></a><span class="lineno"> 269</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> num_channels = input.dimension(channel_idx);</div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> num_rows = input.dimension(height_idx);</div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> num_cols = input.dimension(width_idx);</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; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>.set(0, num_rows * num_cols * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.c0);</div><div class="line"><a name="l00274"></a><span class="lineno"> 274</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>.set(1, <a class="code" href="namespacearm__compute.xhtml#acac1575c0edd329ceb4a54d9fe8dcb08">DIV_CEIL</a>(num_channels, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.c0));</div><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">weights_shape</a>;</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_acac1575c0edd329ceb4a54d9fe8dcb08"><div class="ttname"><a href="namespacearm__compute.xhtml#acac1575c0edd329ceb4a54d9fe8dcb08">arm_compute::DIV_CEIL</a></div><div class="ttdeci">constexpr auto DIV_CEIL(S val, T m) -&gt; decltype((val+m - 1)/m)</div><div class="ttdoc">Calculate the rounded up quotient of val / m.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_utils_8h_source.xhtml#l00053">Utils.h:53</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_ae8f0126f051c787279a8c9ee3c3a5d55"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#ae8f0126f051c787279a8c9ee3c3a5d55">arm_compute::test::validation::weights_shape</a></div><div class="ttdeci">weights_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="arm__compute_2core_2_utils_8h_source.xhtml#l00053">arm_compute::DIV_CEIL()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::info</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::weights_shape</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_depthwise_convolution_layer_8cpp_source.xhtml#l00139">CLDepthwiseConvolutionLayer3x3::validate()</a>.</p>
</div>
</div>
<a id="a09ad10a110d947fd9c444b2ea5e4c127"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09ad10a110d947fd9c444b2ea5e4c127">&#9670;&nbsp;</a></span>compute_rhs_reshaped_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_rhs_reshaped_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_g_e_m_m_r_h_s_matrix_info.xhtml">GEMMRHSMatrixInfo</a> &amp;&#160;</td>
<td class="paramname"><em>rhs_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the Right Hand Side matrix reshaped shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs_info</td><td>Right Hand Side matrix information</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00188">188</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;{</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(rhs_info.n0 == 0);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(rhs_info.k0 == 0);</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(rhs_info.h0 == 0);</div><div class="line"><a name="l00193"></a><span class="lineno"> 193</span>&#160;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span>&#160; <span class="comment">// Input width/height</span></div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_width = a.dimension(0);</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> input_height = a.dimension(1);</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>&#160;</div><div class="line"><a name="l00198"></a><span class="lineno"> 198</span>&#160; <span class="comment">// Number of horizontal/vertical blocks in the input tensor</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_horiz_blocks = std::ceil(input_width / static_cast&lt;float&gt;(rhs_info.n0));</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> num_vert_blocks = std::ceil(input_height / static_cast&lt;float&gt;(rhs_info.k0));</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>&#160; <span class="comment">// Block size</span></div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> block_size = rhs_info.n0 * rhs_info.k0;</div><div class="line"><a name="l00204"></a><span class="lineno"> 204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span>&#160; <span class="comment">// Output width/height</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_width = block_size * num_vert_blocks * rhs_info.h0;</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_height = std::ceil(num_horiz_blocks / static_cast&lt;float&gt;(rhs_info.h0));</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; TensorShape rhs_shape{ a.tensor_shape() };</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; rhs_shape.set(0, output_width);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160; rhs_shape.set(1, output_height);</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160;</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <span class="keywordflow">return</span> rhs_shape;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;}</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><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01870">GEMMRHSMatrixInfo::h0</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01869">GEMMRHSMatrixInfo::k0</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01868">GEMMRHSMatrixInfo::n0</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_2_g_e_m_m_reshape_r_h_s_matrix_8cpp_source.xhtml#l00093">arm_compute::test::validation::DATA_TEST_CASE()</a>, and <a class="el" href="_c_l_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00237">CLGEMMLowpMatrixMultiplyCore::validate()</a>.</p>
</div>
</div>
<a id="af98bc3ef5c65dbb63bc79700ccdd043b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af98bc3ef5c65dbb63bc79700ccdd043b">&#9670;&nbsp;</a></span>compute_rnn_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_rnn_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const unsigned int&#160;</td>
<td class="paramname"><em>batch_size</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the RNN shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">batch_size</td><td>Batch size</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00805">805</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00806"></a><span class="lineno"> 806</span>&#160;{</div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, batch_size);</div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>&#160;</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00069">CLRNNLayer::configure()</a>, <a class="el" href="_n_e_r_n_n_layer_8cpp_source.xhtml#l00067">NERNNLayer::configure()</a>, <a class="el" href="_c_l_r_n_n_layer_8cpp_source.xhtml#l00044">CLRNNLayer::validate()</a>, and <a class="el" href="_n_e_r_n_n_layer_8cpp_source.xhtml#l00042">NERNNLayer::validate()</a>.</p>
</div>
</div>
<a id="a3d3eaddfd85c16e7a9a385ba0e6a45b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3d3eaddfd85c16e7a9a385ba0e6a45b0">&#9670;&nbsp;</a></span>compute_roi_align_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_roi_align_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>rois</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_r_o_i_pooling_layer_info.xhtml">ROIPoolingLayerInfo</a>&#160;</td>
<td class="paramname"><em>pool_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the output roi align shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rois</td><td>Rois tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">pool_info</td><td>Pooling layer info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00784">784</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00785"></a><span class="lineno"> 785</span>&#160;{</div><div class="line"><a name="l00786"></a><span class="lineno"> 786</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00787"></a><span class="lineno"> 787</span>&#160;</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00790"></a><span class="lineno"> 790</span>&#160;</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, pool_info.pooled_width());</div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, pool_info.pooled_height());</div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(3, rois.dimension(1));</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>&#160;</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span>&#160;}</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01296">ROIPoolingLayerInfo::pooled_height()</a>, <a class="el" href="arm__compute_2core_2_types_8h_source.xhtml#l01291">ROIPoolingLayerInfo::pooled_width()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
</div>
</div>
<a id="a30c67d11c15378ffe67ca3c31e848917"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a30c67d11c15378ffe67ca3c31e848917">&#9670;&nbsp;</a></span>compute_slice_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_slice_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>starts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>ends</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the slice output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">starts</td><td>The starts of the dimensions of the input tensor to be sliced </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ends</td><td>The ends of the dimensions of the input tensor to be sliced</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00981">981</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>&#160;{</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml">arm_compute::helpers::tensor_transform</a>;</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span>&#160;</div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#adb1ed814b11a751017250143fb1a9174">compute_strided_slice_output_shape</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>,</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>&#160; starts, ends, <a class="code" href="namespacearm__compute.xhtml#a11916d4148a39a67794050373f54825a">BiStrides</a>(),</div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>&#160; 0, <a class="code" href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#a396d80389277ad8cd13a5e0567776191">construct_slice_end_mask</a>(ends), 0);</div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a11916d4148a39a67794050373f54825a"><div class="ttname"><a href="namespacearm__compute.xhtml#a11916d4148a39a67794050373f54825a">arm_compute::BiStrides</a></div><div class="ttdeci">Coordinates BiStrides</div><div class="ttdoc">Bidirectional strides.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00049">Types.h:49</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1helpers_1_1tensor__transform_xhtml"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml">arm_compute::helpers::tensor_transform</a></div><div class="ttdef"><b>Definition:</b> <a href="tensor__transform_8h_source.xhtml#l00033">tensor_transform.h:33</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1helpers_1_1tensor__transform_xhtml_a396d80389277ad8cd13a5e0567776191"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#a396d80389277ad8cd13a5e0567776191">arm_compute::helpers::tensor_transform::construct_slice_end_mask</a></div><div class="ttdeci">int32_t construct_slice_end_mask(Coordinates ends)</div><div class="ttdoc">Constructs end mask in case we want to perform a slice operation using the strided slice interface.</div><div class="ttdef"><b>Definition:</b> <a href="tensor__transform_8cpp_source.xhtml#l00165">tensor_transform.cpp:165</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1helpers_1_1tensor__transform_xhtml_adb1ed814b11a751017250143fb1a9174"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#adb1ed814b11a751017250143fb1a9174">arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape</a></div><div class="ttdeci">TensorShape compute_strided_slice_output_shape(TensorShape input_shape, Coordinates starts, Coordinates ends, Coordinates strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0, bool return_unshrinked=false)</div><div class="ttdoc">Computes output shape of strided slice.</div><div class="ttdef"><b>Definition:</b> <a href="tensor__transform_8cpp_source.xhtml#l00132">tensor_transform.cpp:132</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="tensor__transform_8cpp_source.xhtml#l00132">arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape()</a>, <a class="el" href="tensor__transform_8cpp_source.xhtml#l00165">arm_compute::helpers::tensor_transform::construct_slice_end_mask()</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>.</p>
<p class="reference">Referenced by <a class="el" href="_slice_layer_node_8cpp_source.xhtml#l00052">SliceLayerNode::compute_output_descriptor()</a>, and <a class="el" href="_slice_operations_8cpp_source.xhtml#l00038">arm_compute::test::validation::reference::slice()</a>.</p>
</div>
</div>
<a id="ad16b366db486fec63b6d962937ec4545"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad16b366db486fec63b6d962937ec4545">&#9670;&nbsp;</a></span>compute_softmax_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_softmax_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>axis</em> = <code>1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the softmax output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>(Optional) Softmax axis</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00569">569</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>&#160;{</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>&#160; <span class="comment">// The output shape will be a 2D version of the input. For instance:</span></div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span>&#160; <span class="comment">// - [x,y,z] and axis 1 will return [x, y*z]</span></div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>&#160; <span class="comment">// - [x,y,z,w] and axis 2 will return [x*y, w*z]</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>&#160; <span class="comment">// - [x,y,z,w] and axis 3 will return [x*y*z, w]</span></div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span>&#160; TensorShape shape2D = input-&gt;tensor_shape();</div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>&#160;</div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>&#160; <span class="keywordflow">if</span>(axis &lt; input-&gt;num_dimensions())</div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>&#160; {</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>&#160; <span class="comment">// Collapse from axis onward (this changes the shape)</span></div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>&#160; shape2D.collapse_from(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>);</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>&#160;</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span>&#160; <span class="comment">// Collapse the rest (collapse is inclusive)</span></div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>&#160; shape2D.collapse(shape2D.num_dimensions() - 1);</div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>&#160; }</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>&#160; <span class="keywordflow">else</span></div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span>&#160; {</div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>&#160; <span class="comment">// Collapse everything</span></div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>&#160; shape2D.collapse(shape2D.num_dimensions());</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span>&#160; }</div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>&#160;</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a> == 0)</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>&#160; {</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>&#160; <span class="comment">// If axis is zero the first dim should be one. Since</span></div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>&#160; <span class="comment">// collapse is an inclusive operation we need to shift</span></div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>&#160; shape2D.shift_right(1);</div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>&#160; }</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>&#160;</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>&#160; <span class="keywordflow">return</span> shape2D;</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00132">TensorShape::collapse()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00162">Dimensions&lt; T &gt;::collapse_from()</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00122">Dimensions&lt; T &gt;::num_dimensions()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00143">TensorShape::shift_right()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_softmax_layer_8cpp_source.xhtml#l00148">CLSoftmaxLayer::validate()</a>, and <a class="el" href="_n_e_softmax_layer_8cpp_source.xhtml#l00141">NESoftmaxLayer::validate()</a>.</p>
</div>
</div>
<a id="a585529133e437dc5f935d33de17c4abb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a585529133e437dc5f935d33de17c4abb">&#9670;&nbsp;</a></span>compute_space_to_batch_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_space_to_batch_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>block_x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>block_y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>padding_left</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>padding_right</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the space to batch output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block_x</td><td>Block shape x value </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block_y</td><td>Block shape y value </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">padding_left</td><td>Left padding values </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">padding_right</td><td>Right padding values</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01082">1082</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>&#160;{</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>&#160;</div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input-&gt;data_layout();</div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_batch = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::BATCHES);</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>&#160;</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, input-&gt;tensor_shape()[idx_width] * block_x + padding_left.x() + padding_right.x());</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, input-&gt;tensor_shape()[idx_height] * block_y + padding_left.y() + padding_right.y());</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_batch, input-&gt;tensor_shape()[idx_batch] / (block_x * block_y));</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>&#160;</div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a628bcf7e10fc1c2a984f379a1ec3393a">arm_compute::BATCHES</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00077">Size2D::x()</a>, and <a class="el" href="_size2_d_8h_source.xhtml#l00086">Size2D::y()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_space_to_batch_layer_kernel_8cpp_source.xhtml#l00121">CLSpaceToBatchLayerKernel::configure()</a>, and <a class="el" href="_n_e_space_to_batch_layer_kernel_8cpp_source.xhtml#l00109">NESpaceToBatchLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="abd7ceb09e076b5e3374aeb1fab08fc84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abd7ceb09e076b5e3374aeb1fab08fc84">&#9670;&nbsp;</a></span>compute_space_to_depth_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_space_to_depth_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>block_shape</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the space to batch output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">block_shape</td><td>Block shape value</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01105">1105</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>&#160;{</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input-&gt;tensor_shape() };</div><div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>&#160;</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input-&gt;data_layout();</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_depth = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>&#160;</div><div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_width, input-&gt;tensor_shape()[idx_width] * block_shape);</div><div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_height, input-&gt;tensor_shape()[idx_height] * block_shape);</div><div class="line"><a name="l01116"></a><span class="lineno"> 1116</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_depth, input-&gt;tensor_shape()[idx_depth] / (block_shape * block_shape));</div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>&#160;</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_space_to_depth_layer_kernel_8cpp_source.xhtml#l00073">NESpaceToDepthLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="abe10cfa0b480704109fd1a925301f58b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe10cfa0b480704109fd1a925301f58b">&#9670;&nbsp;</a></span>compute_split_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_split_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>axis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_splits</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the split output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>Axis on which to split the input </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_splits</td><td>Number of splits</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01047">1047</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;{</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160; TensorShape empty_shape;</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160; empty_shape.set(0, 0);</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160; TensorShape out_shape{ input-&gt;tensor_shape() };</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;</div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160; <span class="comment">// Return empty shape if axis is invalid</span></div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a> &gt; input-&gt;tensor_shape().num_dimensions())</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160; {</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160; <span class="keywordflow">return</span> empty_shape;</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>&#160; }</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160; <span class="keywordtype">size_t</span> axis_size = out_shape[<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>];</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160; <span class="comment">// Return empty shape if num_split is not valid</span></div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160; <span class="keywordflow">if</span>(axis_size % num_splits)</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160; {</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160; <span class="keywordflow">return</span> empty_shape;</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160; }</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160; out_shape[<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>] = axis_size / num_splits;</div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160; <span class="keywordflow">return</span> out_shape;</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, <a class="el" href="_dimensions_8h_source.xhtml#l00122">Dimensions&lt; T &gt;::num_dimensions()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_split_8cpp_source.xhtml#l00042">CLSplit::configure()</a>, <a class="el" href="_n_e_split_8cpp_source.xhtml#l00042">NESplit::configure()</a>, <a class="el" href="_n_e_split_8cpp_source.xhtml#l00090">NESplit::validate()</a>, and <a class="el" href="_c_l_split_8cpp_source.xhtml#l00090">CLSplit::validate()</a>.</p>
</div>
</div>
<a id="a32c692ab35f40f9ce6e27e1f4016e921"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32c692ab35f40f9ce6e27e1f4016e921">&#9670;&nbsp;</a></span>compute_stack_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_stack_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>a</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>axis</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_tensors</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the stack output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">a</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">axis</td><td>Axis on which to perform the stack operation </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_tensors</td><td>Number of tensors to stack</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01310">1310</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span>&#160;{</div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a> &gt; a.num_dimensions());</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(a.num_dimensions() &gt; 4);</div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>&#160;</div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>&#160; TensorShape shape_out{ a.tensor_shape() };</div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span>&#160; shape_out.set(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f2a0a7758d36198492af046c46ddbf5">num_tensors</a>);</div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>&#160;</div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i_shift = 0;</div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span>&#160;</div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; a.num_dimensions(); ++i)</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>&#160; {</div><div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>&#160; <span class="keywordflow">if</span>(i == <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">axis</a>)</div><div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>&#160; {</div><div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>&#160; i_shift++;</div><div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>&#160; }</div><div class="line"><a name="l01326"></a><span class="lineno"> 1326</span>&#160;</div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>&#160; shape_out.set(i + i_shift, a.tensor_shape()[i]);</div><div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>&#160; }</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>&#160; <span class="keywordflow">return</span> shape_out;</div><div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>&#160;}</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="namespacearm__compute_1_1test_1_1validation_xhtml_a4f2a0a7758d36198492af046c46ddbf5"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f2a0a7758d36198492af046c46ddbf5">arm_compute::test::validation::num_tensors</a></div><div class="ttdeci">num_tensors</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00227">StackLayer.cpp:227</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_accc088009d44c521706aa98d6387ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#accc088009d44c521706aa98d6387ee21">arm_compute::test::validation::axis</a></div><div class="ttdeci">axis</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">StackLayer.cpp:226</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00226">arm_compute::test::validation::axis</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a1f4e725b8e1ea36b30e09dc08ae6961d">ITensorInfo::num_dimensions()</a>, <a class="el" href="_n_e_o_n_2_stack_layer_8cpp_source.xhtml#l00227">arm_compute::test::validation::num_tensors</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_stack_layer_node_8cpp_source.xhtml#l00050">StackLayerNode::compute_output_descriptor()</a>.</p>
</div>
</div>
<a id="ab288dc7ed664925c6f992b0e6aa3bc1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab288dc7ed664925c6f992b0e6aa3bc1b">&#9670;&nbsp;</a></span>compute_strided_slice_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_strided_slice_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>starts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>ends</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_coordinates.xhtml">Coordinates</a> &amp;&#160;</td>
<td class="paramname"><em>strides</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>begin_mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>end_mask</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int32_t&#160;</td>
<td class="paramname"><em>shrink_axis_mask</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the strided slice output shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">starts</td><td>The starts of the dimensions of the input tensor to be sliced </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ends</td><td>The ends of the dimensions of the input tensor to be sliced </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strides</td><td>The strides of the dimensions of the input tensor to be sliced </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">begin_mask</td><td>If the ith bit of begin_mask is set, starts[i] is ignored and the fullest possible range in that dimension is used instead. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">end_mask</td><td>If the ith bit of end_mask is set, ends[i] is ignored and the fullest possible range in that dimension is used instead. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">shrink_axis_mask</td><td>If the ith bit of shrink_axis_mask is set, it implies that the ith specification shrinks the dimensionality by 1</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00965">965</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00968"></a><span class="lineno"> 968</span>&#160;{</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span>&#160; <span class="keyword">using namespace </span><a class="code" href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml">arm_compute::helpers::tensor_transform</a>;</div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#adb1ed814b11a751017250143fb1a9174">compute_strided_slice_output_shape</a>(input.tensor_shape(), starts, ends, strides, begin_mask, end_mask, shrink_axis_mask);</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1helpers_1_1tensor__transform_xhtml"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml">arm_compute::helpers::tensor_transform</a></div><div class="ttdef"><b>Definition:</b> <a href="tensor__transform_8h_source.xhtml#l00033">tensor_transform.h:33</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1helpers_1_1tensor__transform_xhtml_adb1ed814b11a751017250143fb1a9174"><div class="ttname"><a href="namespacearm__compute_1_1helpers_1_1tensor__transform.xhtml#adb1ed814b11a751017250143fb1a9174">arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape</a></div><div class="ttdeci">TensorShape compute_strided_slice_output_shape(TensorShape input_shape, Coordinates starts, Coordinates ends, Coordinates strides, int32_t begin_mask=0, int32_t end_mask=0, int32_t shrink_axis_mask=0, bool return_unshrinked=false)</div><div class="ttdoc">Computes output shape of strided slice.</div><div class="ttdef"><b>Definition:</b> <a href="tensor__transform_8cpp_source.xhtml#l00132">tensor_transform.cpp:132</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="tensor__transform_8cpp_source.xhtml#l00132">arm_compute::helpers::tensor_transform::compute_strided_slice_output_shape()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="a626cdfbacb377ee26462155d421717d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a626cdfbacb377ee26462155d421717d3">&#9670;&nbsp;</a></span>compute_tiled_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_tiled_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input_shape</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacearm__compute.xhtml#afe9e10e5fdfd1e2665ac17c75c0cacd8">Multiples</a> &amp;&#160;</td>
<td class="paramname"><em>multiples</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the tiled shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input_shape</td><td>Input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">multiples</td><td>Paddings list</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01168">1168</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>&#160;{</div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>&#160; TensorShape tiled_shape = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>;</div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>&#160; <span class="keywordflow">for</span>(<span class="keywordtype">size_t</span> dim = 0; dim &lt; multiples.size(); ++dim)</div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span>&#160; {</div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>&#160; tiled_shape.set(dim, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">input_shape</a>[dim] * multiples[dim]);</div><div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>&#160; }</div><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>&#160; <span class="keywordflow">return</span> tiled_shape;</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a865514e30baa11b11c8fa65f944532fb"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a865514e30baa11b11c8fa65f944532fb">arm_compute::test::validation::input_shape</a></div><div class="ttdeci">input_shape</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::input_shape</a>, and <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_tile_kernel_8cpp_source.xhtml#l00068">CLTileKernel::configure()</a>, <a class="el" href="_n_e_tile_kernel_8cpp_source.xhtml#l00064">NETileKernel::configure()</a>, and <a class="el" href="reference_2_tile_8cpp_source.xhtml#l00038">arm_compute::test::validation::reference::tile()</a>.</p>
</div>
</div>
<a id="a70a2ef9fd754b5798a0a92656f8b5fcf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a70a2ef9fd754b5798a0a92656f8b5fcf">&#9670;&nbsp;</a></span>compute_transpose1xW_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_transpose1xW_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>b</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the transposed 1xW shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00284">284</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><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; <span class="comment">// The transpose1xW output matrix will have the following shape: [ b_height * 16, ceil(b_width / 16.0f) ]</span></div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160; TensorShape shape_transposed1xW_b{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.tensor_shape() };</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>&#160; shape_transposed1xW_b.set(0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.dimension(1) * 16);</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span>&#160; shape_transposed1xW_b.set(1, std::ceil(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.dimension(0) / 16.f));</div><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno"> 291</span>&#160; <span class="keywordflow">return</span> shape_transposed1xW_b;</div><div class="line"><a name="l00292"></a><span class="lineno"> 292</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_g_e_m_m_lowp_matrix_multiply_core_8cpp_source.xhtml#l00050">NEGEMMLowpMatrixMultiplyCore::configure()</a>.</p>
</div>
</div>
<a id="a5797726a8fbee3b11b92757c2f0031d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5797726a8fbee3b11b92757c2f0031d6">&#9670;&nbsp;</a></span>compute_transpose1xW_with_element_size_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_transpose1xW_with_element_size_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>b</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>mult_transpose1xW_width</em> = <code>1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the transposed 1xW width element shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">b</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">mult_transpose1xW_width</td><td>(Optional) Transpose1xW width</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00301">301</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160;{</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160; <span class="comment">// Note: mult_transpose1xW_width expresses the number of chunks with size 1x(W) we want to store on the same row</span></div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>&#160; <span class="comment">// The transpose1xW output matrix will have the following shape:</span></div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>&#160; <span class="comment">// [ b_height * W, ceil(b_width / W) ] where W = (16 / element size of the tensor) * mult_transpose1xW_width</span></div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(mult_transpose1xW_width &lt; 1);</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>&#160; TensorShape shape_transposed1xW_b{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.tensor_shape() };</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> transpose_width = (16 / <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.element_size()) * mult_transpose1xW_width;</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>&#160; shape_transposed1xW_b.set(0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.dimension(1) * transpose_width);</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>&#160; shape_transposed1xW_b.set(1, static_cast&lt;size_t&gt;(std::ceil(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">b</a>.dimension(0) / static_cast&lt;float&gt;(transpose_width))));</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>&#160;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span>&#160; <span class="keywordflow">return</span> shape_transposed1xW_b;</div><div class="line"><a name="l00313"></a><span class="lineno"> 313</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aa76b4a6e74940dabc5b7fc6b2dab3545"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aa76b4a6e74940dabc5b7fc6b2dab3545">arm_compute::test::validation::b</a></div><div class="ttdeci">SimpleTensor&lt; float &gt; b</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">DFT.cpp:157</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><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, and <a class="el" href="_c_p_p_2_d_f_t_8cpp_source.xhtml#l00157">arm_compute::test::validation::b</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_g_e_m_m_8cpp_source.xhtml#l00139">NEGEMM::validate()</a>.</p>
</div>
</div>
<a id="a69cb11b5b37f94a6bea9eaad9d13cccf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69cb11b5b37f94a6bea9eaad9d13cccf">&#9670;&nbsp;</a></span>compute_transposed_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_transposed_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the transposed shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00390">390</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>&#160;{</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>&#160; TensorShape shape_transposed{ input.tensor_shape() };</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>&#160;</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>&#160; shape_transposed.set(0, input.dimension(1));</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>&#160; shape_transposed.set(1, input.dimension(0));</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>&#160;</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>&#160; <span class="keywordflow">return</span> shape_transposed;</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>&#160;}</div></div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_tensor_shape_8h_source.xhtml#l00078">TensorShape::set()</a>, and <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00056">NELSTMLayer::configure()</a>, <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00056">CLLSTMLayer::configure()</a>, <a class="el" href="_n_e_fully_connected_layer_8cpp_source.xhtml#l00245">NEFullyConnectedLayer::validate()</a>, <a class="el" href="_c_l_fully_connected_layer_8cpp_source.xhtml#l00249">CLFullyConnectedLayer::validate()</a>, <a class="el" href="_n_e_l_s_t_m_layer_8cpp_source.xhtml#l00381">NELSTMLayer::validate()</a>, and <a class="el" href="_c_l_l_s_t_m_layer_8cpp_source.xhtml#l00388">CLLSTMLayer::validate()</a>.</p>
</div>
</div>
<a id="a3173d90757ec6ff31441b55883eafbca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3173d90757ec6ff31441b55883eafbca">&#9670;&nbsp;</a></span>compute_upsample_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_upsample_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_size2_d.xhtml">Size2D</a> &amp;&#160;</td>
<td class="paramname"><em>info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the upsampled shape of a tensor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">info</td><td>Contains stride information (x and y)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01200">1200</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span>&#160;{</div><div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = input.data_layout();</div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_width = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>&#160; <span class="keyword">const</span> <span class="keywordtype">int</span> idx_height = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>&#160;</div><div class="line"><a name="l01206"></a><span class="lineno"> 1206</span>&#160; TensorShape scale_out_shape(input.tensor_shape());</div><div class="line"><a name="l01207"></a><span class="lineno"> 1207</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_x = input.dimension(idx_width) * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.x();</div><div class="line"><a name="l01208"></a><span class="lineno"> 1208</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_y = input.dimension(idx_height) * <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">info</a>.y();</div><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span>&#160; scale_out_shape.set(idx_width, out_x);</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>&#160; scale_out_shape.set(idx_height, out_y);</div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span>&#160;</div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>&#160; <span class="keywordflow">return</span> scale_out_shape;</div><div class="line"><a name="l01213"></a><span class="lineno"> 1213</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a4f4125dba5283887b34f889b1c615c0c"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a4f4125dba5283887b34f889b1c615c0c">arm_compute::test::validation::info</a></div><div class="ttdeci">info</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::info</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, and <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_upsample_layer_kernel_8cpp_source.xhtml#l00066">CLUpsampleLayerKernel::configure()</a>, and <a class="el" href="_n_e_upsample_layer_kernel_8cpp_source.xhtml#l00295">NEUpsampleLayerKernel::configure()</a>.</p>
</div>
</div>
<a id="a951fb0d8dcf2a2a338e26a59ffc9af17"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a951fb0d8dcf2a2a338e26a59ffc9af17">&#9670;&nbsp;</a></span>compute_vector_to_tensor_output_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_vector_to_tensor_output_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>conv_w</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>conv_h</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> &amp;&#160;</td>
<td class="paramname"><em>data_layout</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the output tensor shape of a vector input given the convolution dimensions. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor shape </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_w</td><td>Convolution width </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">conv_h</td><td>Convolution height </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data_layout</td><td>Data layout</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00051">51</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160;{</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_w = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_h = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_c = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>(input);</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_w, conv_w);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_h, conv_h);</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(idx_c, input.x() / (conv_w * conv_h));</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">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>, and <a class="el" href="_dimensions_8h_source.xhtml#l00081">Dimensions&lt; T &gt;::x()</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_depthwise_vector_to_tensor_kernel_8cpp_source.xhtml#l00064">CLDepthwiseVectorToTensorKernel::configure()</a>, and <a class="el" href="_n_e_depthwise_vector_to_tensor_kernel_8cpp_source.xhtml#l00098">NEDepthwiseVectorToTensorKernel::configure()</a>.</p>
</div>
</div>
<a id="a6365b505b5c1b98916425bc692b6ea49"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6365b505b5c1b98916425bc692b6ea49">&#9670;&nbsp;</a></span>compute_weights_reshaped_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_weights_reshaped_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>weights</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>has_bias</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>num_groups</em> = <code>1</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the reshaped shape of the weights. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">weights</td><td>Weights tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">has_bias</td><td>(Optional) Set to true if there is bias </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">num_groups</td><td>(Optional) Number of groups</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape of the reshaped weights </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00113">113</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;{</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; <span class="comment">// Number of groups greater than one are only supported for NCHW data layout, and the number of weights must be a multiple of it.</span></div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> == 0);</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.data_layout() == DataLayout::NHWC &amp;&amp; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a> &gt; 1);</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; <a class="code" href="_error_8h.xhtml#a54a6080c9f4df1f908e57a9bbb46f5da">ARM_COMPUTE_ERROR_ON</a>((<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.dimension(3) % <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>) != 0);</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// Calculate output shape</span></div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; TensorShape weights_reshaped{ <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.tensor_shape() };</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; weights_reshaped.set(3, weights_reshaped[3] / <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; weights_reshaped.collapse(3);</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> tmp_dim = weights_reshaped[0];</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; weights_reshaped.set(0, weights_reshaped[1]);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; weights_reshaped.set(1, tmp_dim + (<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a9aeced5a5128f60a31ea3e327a45ee21">has_bias</a> ? 1 : 0));</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; <span class="keywordflow">if</span>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">weights</a>.num_dimensions() &lt; 5)</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; {</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; weights_reshaped.set(2, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">num_groups</a>);</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; }</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; <span class="keywordflow">return</span> weights_reshaped;</div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;}</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="namespacearm__compute_1_1test_1_1validation_xhtml_a2270b3e1d20651d2d8341c858c890830"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a2270b3e1d20651d2d8341c858c890830">arm_compute::test::validation::num_groups</a></div><div class="ttdeci">const unsigned int num_groups</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">Im2Col.cpp:148</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a9aeced5a5128f60a31ea3e327a45ee21"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a9aeced5a5128f60a31ea3e327a45ee21">arm_compute::test::validation::has_bias</a></div><div class="ttdeci">const bool has_bias</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00147">Im2Col.cpp:147</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a64a08a9fec5aeee8650e7182b6d171d0"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a64a08a9fec5aeee8650e7182b6d171d0">arm_compute::test::validation::weights</a></div><div class="ttdeci">CLTensor weights</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">ConvolutionLayer.cpp:180</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_error_8h_source.xhtml#l00337">ARM_COMPUTE_ERROR_ON</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00147">arm_compute::test::validation::has_bias</a>, <a class="el" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">arm_compute::NHWC</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00148">arm_compute::test::validation::num_groups</a>, and <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00180">arm_compute::test::validation::weights</a>.</p>
<p class="reference">Referenced by <a class="el" href="_g_c_weights_reshape_kernel_8cpp_source.xhtml#l00046">GCWeightsReshapeKernel::configure()</a>, <a class="el" href="_c_l_weights_reshape_kernel_8cpp_source.xhtml#l00078">CLWeightsReshapeKernel::configure()</a>, <a class="el" href="_n_e_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00397">NEGEMMConvolutionLayer::validate()</a>, and <a class="el" href="_c_l_g_e_m_m_convolution_layer_8cpp_source.xhtml#l00373">CLGEMMConvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a25e3751f07d4b2771a05d8d01a7f7620"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a25e3751f07d4b2771a05d8d01a7f7620">&#9670;&nbsp;</a></span>compute_winograd_filter_transform_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_winograd_filter_transform_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;&#160;</td>
<td class="paramname"><em>winograd_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the winograd filter transform shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">winograd_info</td><td>Winograd information</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00608">608</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00609"></a><span class="lineno"> 609</span>&#160;{</div><div class="line"><a name="l00610"></a><span class="lineno"> 610</span>&#160; TensorShape tensor_shape{ input.tensor_shape() };</div><div class="line"><a name="l00611"></a><span class="lineno"> 611</span>&#160;</div><div class="line"><a name="l00612"></a><span class="lineno"> 612</span>&#160; <span class="keyword">const</span> Size2D kernel_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.kernel_size;</div><div class="line"><a name="l00613"></a><span class="lineno"> 613</span>&#160; <span class="keyword">const</span> Size2D output_tile_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.output_tile_size;</div><div class="line"><a name="l00614"></a><span class="lineno"> 614</span>&#160; <span class="keyword">const</span> Size2D input_tile_size = Size2D(output_tile_size.width + kernel_size.width - 1, output_tile_size.height + kernel_size.height - 1);</div><div class="line"><a name="l00615"></a><span class="lineno"> 615</span>&#160;</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>&#160; tensor_shape.remove_dimension(<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH));</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>&#160; tensor_shape.set(Window::DimX, input.dimension(3));</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span>&#160; tensor_shape.set(Window::DimY, input.dimension(<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::CHANNEL)));</div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>&#160; tensor_shape.set(Window::DimZ, input_tile_size.area());</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>&#160;</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span>&#160; <span class="keywordflow">return</span> tensor_shape;</div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a809d18ccde99d938a68cb90ef53aa749"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">arm_compute::test::validation::winograd_info</a></div><div class="ttdeci">winograd_info</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00330">Winograd.cpp:330</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_size2_d_8h_source.xhtml#l00053">Size2D::area()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_window_8h_source.xhtml#l00043">Window::DimX</a>, <a class="el" href="_window_8h_source.xhtml#l00045">Window::DimY</a>, <a class="el" href="_window_8h_source.xhtml#l00047">Window::DimZ</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>, and <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00330">arm_compute::test::validation::winograd_info</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_winograd_filter_transform_kernel_8cpp_source.xhtml#l00102">CLWinogradFilterTransformKernel::configure()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00555">NEWinogradConvolutionLayer::validate()</a>, and <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00149">CLWinogradConvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a04249f91ec2964d21a91bb7038821000"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04249f91ec2964d21a91bb7038821000">&#9670;&nbsp;</a></span>compute_winograd_input_transform_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_winograd_input_transform_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;&#160;</td>
<td class="paramname"><em>winograd_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the winograd input transform shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">winograd_info</td><td>Winograd information</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00631">631</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00632"></a><span class="lineno"> 632</span>&#160;{</div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>&#160; <span class="keyword">const</span> PadStrideInfo <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a> = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.convolution_info;</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>&#160; <span class="keyword">const</span> Size2D kernel_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.kernel_size;</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>&#160; <span class="keyword">const</span> Size2D output_tile_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.output_tile_size;</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>&#160; <span class="keyword">const</span> Size2D input_tile_size = Size2D(output_tile_size.width + kernel_size.width - 1, output_tile_size.height + kernel_size.height - 1);</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>&#160;</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_w = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::WIDTH);</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_h = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::HEIGHT);</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>&#160; <span class="keyword">const</span> <span class="keywordtype">size_t</span> idx_c = <a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(input.data_layout(), DataLayoutDimension::CHANNEL);</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>&#160;</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>&#160; <span class="comment">// Compute the number of output tiles along the x and y direction of size &quot;output_tile_size&quot;</span></div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>&#160; <span class="keyword">const</span> Size2D num_tiles = <a class="code" href="namespacearm__compute.xhtml#a3b0c016b53e97663b39c2f3875f46c24">compute_winograd_convolution_tiles</a>(Size2D(input.tensor_shape()[idx_w], input.tensor_shape()[idx_h]),</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>&#160; kernel_size,</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>&#160; output_tile_size,</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a>);</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>&#160;</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> width = input.tensor_shape()[idx_c];</div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> height = num_tiles.area();</div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> depth = input_tile_size.area();</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>&#160;</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span>&#160; TensorShape <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>{ input.tensor_shape() };</div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(0, width);</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(1, height);</div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>&#160; <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>.set(2, depth);</div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>&#160;</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>&#160; <span class="keywordflow">return</span> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7fc93f37dac131a1a40b7921f9df3a9a">output_shape</a>;</div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a00525ff582f16038a1d3819aa44a23a3"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">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#l00599">Winograd.cpp:599</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a809d18ccde99d938a68cb90ef53aa749"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">arm_compute::test::validation::winograd_info</a></div><div class="ttdeci">winograd_info</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00330">Winograd.cpp:330</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a3b0c016b53e97663b39c2f3875f46c24"><div class="ttname"><a href="namespacearm__compute.xhtml#a3b0c016b53e97663b39c2f3875f46c24">arm_compute::compute_winograd_convolution_tiles</a></div><div class="ttdeci">Size2D compute_winograd_convolution_tiles(const Size2D &amp;in_dims, const Size2D &amp;kernel_size, const Size2D &amp;output_tile_size, const PadStrideInfo &amp;conv_info)</div><div class="ttdoc">Calculate the number of output tiles required by Winograd Convolution layer.</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00744">Helpers.h:744</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_convolution_layer_8cpp_source.xhtml#l00174">ConvolutionLayer.cpp:174</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="_size2_d_8h_source.xhtml#l00053">Size2D::area()</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00744">arm_compute::compute_winograd_convolution_tiles()</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00599">arm_compute::test::validation::conv_info</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a367b5090ab432bc7de2c32369e087ab1">ITensorInfo::data_layout()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="validation_2_c_l_2_convolution_layer_8cpp_source.xhtml#l00174">arm_compute::test::validation::output_shape</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>, and <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00330">arm_compute::test::validation::winograd_info</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_winograd_input_transform_kernel_8cpp_source.xhtml#l00111">CLWinogradInputTransformKernel::configure()</a>, <a class="el" href="_n_e_winograd_convolution_layer_8cpp_source.xhtml#l00555">NEWinogradConvolutionLayer::validate()</a>, and <a class="el" href="_c_l_winograd_convolution_layer_8cpp_source.xhtml#l00149">CLWinogradConvolutionLayer::validate()</a>.</p>
</div>
</div>
<a id="a5699c316d27b41f0790827791e88ae26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5699c316d27b41f0790827791e88ae26">&#9670;&nbsp;</a></span>compute_winograd_output_transform_shape()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::compute_winograd_output_transform_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> &amp;&#160;</td>
<td class="paramname"><em>input</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="structarm__compute_1_1_winograd_info.xhtml">WinogradInfo</a> &amp;&#160;</td>
<td class="paramname"><em>winograd_info</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Calculate the winograd output transform shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">input</td><td>Input tensor info </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">winograd_info</td><td>Winograd information</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the calculated shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l00667">667</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>&#160;{</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span>&#160; <span class="keyword">const</span> PadStrideInfo <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a> = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.convolution_info;</div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>&#160; <span class="keyword">const</span> Size2D kernel_size = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.kernel_size;</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>&#160; <span class="keyword">const</span> Size2D input_dimensions = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.input_dimensions;</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span>&#160; <span class="keyword">const</span> <a class="code" href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">DataLayout</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a> = <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">winograd_info</a>.output_data_layout;</div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>&#160;</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>&#160; <span class="comment">// Compute output shape</span></div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_width = 0;</div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>&#160; <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> output_height = 0;</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>&#160; std::tie(output_width, output_height) = <a class="code" href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">scaled_dimensions</a>(input_dimensions.width, input_dimensions.height,</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>&#160; kernel_size.width, kernel_size.height, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">conv_info</a>);</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>&#160;</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>&#160; TensorShape tensor_shape{ input.tensor_shape() };</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>&#160;</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>&#160; <span class="comment">// Output dimension</span></div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_w = output_width;</div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_h = output_height;</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>&#160; <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> out_c = input.dimension(0);</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>&#160;</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>&#160; tensor_shape.set(<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::WIDTH), out_w);</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>&#160; tensor_shape.set(<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::HEIGHT), out_h);</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>&#160; tensor_shape.set(<a class="code" href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">get_data_layout_dimension_index</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">data_layout</a>, DataLayoutDimension::CHANNEL), out_c);</div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>&#160;</div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>&#160; <span class="keywordflow">return</span> tensor_shape;</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>&#160;}</div><div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_acf5f12bbab64dd614bd8220c97fe484f"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#acf5f12bbab64dd614bd8220c97fe484f">arm_compute::test::validation::data_layout</a></div><div class="ttdeci">const DataLayout data_layout</div><div class="ttdef"><b>Definition:</b> <a href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">Im2Col.cpp:146</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_abbe3399a66c35c3c353030cd0a84c936"><div class="ttname"><a href="namespacearm__compute.xhtml#abbe3399a66c35c3c353030cd0a84c936">arm_compute::scaled_dimensions</a></div><div class="ttdeci">std::pair&lt; unsigned int, unsigned int &gt; scaled_dimensions(unsigned int width, unsigned int height, unsigned int kernel_width, unsigned int kernel_height, const PadStrideInfo &amp;pad_stride_info, const Size2D &amp;dilation=Size2D(1U, 1U))</div><div class="ttdoc">Returns expected width and height of output scaled tensor depending on dimensions rounding mode.</div><div class="ttdef"><b>Definition:</b> <a href="src_2core_2_utils_8cpp_source.xhtml#l00387">Utils.cpp:387</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a00525ff582f16038a1d3819aa44a23a3"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a00525ff582f16038a1d3819aa44a23a3">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#l00599">Winograd.cpp:599</a></div></div>
<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a809d18ccde99d938a68cb90ef53aa749"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a809d18ccde99d938a68cb90ef53aa749">arm_compute::test::validation::winograd_info</a></div><div class="ttdeci">winograd_info</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_winograd_8cpp_source.xhtml#l00330">Winograd.cpp:330</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_a46e938020a3ac8c926d0590b7fe957db"><div class="ttname"><a href="namespacearm__compute.xhtml#a46e938020a3ac8c926d0590b7fe957db">arm_compute::get_data_layout_dimension_index</a></div><div class="ttdeci">size_t get_data_layout_dimension_index(const DataLayout data_layout, const DataLayoutDimension data_layout_dimension)</div><div class="ttdoc">Get the index of the given dimension.</div><div class="ttdef"><b>Definition:</b> <a href="_helpers_8inl_source.xhtml#l00326">Helpers.inl:326</a></div></div>
<div class="ttc" id="namespacearm__compute_xhtml_ad1d5cce2d9e9a5d61c243e5c989112e0"><div class="ttname"><a href="namespacearm__compute.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0">arm_compute::DataLayout</a></div><div class="ttdeci">DataLayout</div><div class="ttdoc">[DataLayout enum definition]</div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_types_8h_source.xhtml#l00114">Types.h:114</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02af52e9c50a060add65a035429b2a22229">arm_compute::CHANNEL</a>, <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00599">arm_compute::test::validation::conv_info</a>, <a class="el" href="_n_e_o_n_2_im2_col_8cpp_source.xhtml#l00146">arm_compute::test::validation::data_layout</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a178f0d3d87f959e00a743328d95359d2">ITensorInfo::dimension()</a>, <a class="el" href="_helpers_8inl_source.xhtml#l00326">arm_compute::get_data_layout_dimension_index()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00093">Size2D::height</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02ad770ba3ce18fa409965dfdf5e7c348e6">arm_compute::HEIGHT</a>, <a class="el" href="src_2core_2_utils_8cpp_source.xhtml#l00387">arm_compute::scaled_dimensions()</a>, <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>, <a class="el" href="_size2_d_8h_source.xhtml#l00092">Size2D::width</a>, <a class="el" href="namespacearm__compute.xhtml#a74ce3f7420453d3446218ff3b7453e02a49da85b69bc6285eeee286ca49fa7195">arm_compute::WIDTH</a>, and <a class="el" href="_c_l_2_winograd_8cpp_source.xhtml#l00330">arm_compute::test::validation::winograd_info</a>.</p>
<p class="reference">Referenced by <a class="el" href="_c_l_winograd_output_transform_kernel_8cpp_source.xhtml#l00146">CLWinogradOutputTransformKernel::configure()</a>.</p>
</div>
</div>
<a id="acb3f0c947411cfe1d8c5f67af2cad851"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb3f0c947411cfe1d8c5f67af2cad851">&#9670;&nbsp;</a></span>extract_shape() <span class="overload">[1/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::extract_shape </td>
<td>(</td>
<td class="paramtype">T *&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the tensor shape. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>Input data</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the extracted tensor shape </dd></dl>
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01222">1222</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>&#160;{</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>&#160; <span class="keywordflow">return</span> data-&gt;info()-&gt;tensor_shape();</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="_shape_calculator_8h_source.xhtml#l01268">calculate_concatenate_shape()</a>.</p>
</div>
</div>
<a id="af79493c6c07a3eb2b3a27712221b66b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af79493c6c07a3eb2b3a27712221b66b8">&#9670;&nbsp;</a></span>extract_shape() <span class="overload">[2/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::extract_shape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01227">1227</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01228"></a><span class="lineno"> 1228</span>&#160;{</div><div class="line"><a name="l01229"></a><span class="lineno"> 1229</span>&#160; <span class="keywordflow">return</span> data-&gt;tensor_shape();</div><div class="line"><a name="l01230"></a><span class="lineno"> 1230</span>&#160;}</div></div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="a4205a4be15a80494979ec1f19a66b21a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4205a4be15a80494979ec1f19a66b21a">&#9670;&nbsp;</a></span>extract_shape() <span class="overload">[3/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::extract_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml">ITensorInfo</a> *&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01231">1231</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>&#160;{</div><div class="line"><a name="l01233"></a><span class="lineno"> 1233</span>&#160; <span class="keywordflow">return</span> data-&gt;tensor_shape();</div><div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>&#160;}</div></div><!-- fragment -->
<p class="reference">References <a class="el" href="classarm__compute_1_1_i_tensor_info.xhtml#a7c66505457d00ece3aa4b34cab80757d">ITensorInfo::tensor_shape()</a>.</p>
</div>
</div>
<a id="ae7f0e5491e0f43e371f7db047a03dd4c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7f0e5491e0f43e371f7db047a03dd4c">&#9670;&nbsp;</a></span>extract_shape() <span class="overload">[4/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::extract_shape </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> *&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01236">1236</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>&#160;{</div><div class="line"><a name="l01238"></a><span class="lineno"> 1238</span>&#160; <span class="keywordflow">return</span> *data;</div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a29fee5f196a5154a39526b7b88594059"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29fee5f196a5154a39526b7b88594059">&#9670;&nbsp;</a></span>extract_shape() <span class="overload">[5/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> arm_compute::misc::shape_calculator::extract_shape </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classarm__compute_1_1_tensor_shape.xhtml">TensorShape</a> *&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p class="definition">Definition at line <a class="el" href="_shape_calculator_8h_source.xhtml#l01241">1241</a> of file <a class="el" href="_shape_calculator_8h_source.xhtml">ShapeCalculator.h</a>.</p>
<div class="fragment"><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>&#160;{</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>&#160; <span class="keywordflow">return</span> *data;</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
</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_1misc.xhtml">misc</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1misc_1_1shape__calculator.xhtml">shape_calculator</a></li>
<li class="footer">Generated on Mon Sep 2 2019 11:47:40 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>