Few minor updates to BuildGuideAndroidNDK.md file
[platform/upstream/armnn.git] / Documentation / namespacearmnn_tf_parser.xhtml
1 <!-- Copyright (c) 2020 ARM Limited. -->
2 <!--                                 -->
3 <!-- SPDX-License-Identifier: MIT    -->
4 <!--                                 -->
5 <!-- HTML header for doxygen 1.8.13-->
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
7 <html xmlns="http://www.w3.org/1999/xhtml">
8 <head>
9 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
10 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
11 <meta name="generator" content="Doxygen 1.8.13"/>
12 <meta name="robots" content="NOINDEX, NOFOLLOW" />
13 <meta name="viewport" content="width=device-width, initial-scale=1"/>
14 <title>ArmNN: armnnTfParser Namespace Reference</title>
15 <link href="tabs.css" rel="stylesheet" type="text/css"/>
16 <script type="text/javascript" src="jquery.js"></script>
17 <script type="text/javascript" src="dynsections.js"></script>
18 <link href="navtree.css" rel="stylesheet" type="text/css"/>
19 <script type="text/javascript" src="resize.js"></script>
20 <script type="text/javascript" src="navtreedata.js"></script>
21 <script type="text/javascript" src="navtree.js"></script>
22 <script type="text/javascript">
23   $(document).ready(initResizable);
24 </script>
25 <link href="search/search.css" rel="stylesheet" type="text/css"/>
26 <script type="text/javascript" src="search/searchdata.js"></script>
27 <script type="text/javascript" src="search/search.js"></script>
28 <script type="text/x-mathjax-config">
29   MathJax.Hub.Config({
30     extensions: ["tex2jax.js"],
31     jax: ["input/TeX","output/HTML-CSS"],
32 });
33 </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
34 <link href="doxygen.css" rel="stylesheet" type="text/css" />
35 <link href="stylesheet.css" rel="stylesheet" type="text/css"/>
36 </head>
37 <body>
38 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
39 <div id="titlearea">
40 <table cellspacing="0" cellpadding="0">
41  <tbody>
42  <tr style="height: 56px;">
43   <img alt="ArmNN" src="Arm_NN_horizontal_blue.png" style="max-width: 10rem; margin-top: .5rem; margin-left 10px"/>
44   <td style="padding-left: 0.5em;">
45    <div id="projectname">
46    &#160;<span id="projectnumber">20.02</span>
47    </div>
48   </td>
49  </tr>
50  </tbody>
51 </table>
52 </div>
53 <!-- end header part -->
54 <!-- Generated by Doxygen 1.8.13 -->
55 <script type="text/javascript">
56 var searchBox = new SearchBox("searchBox", "search",false,'Search');
57 </script>
58 <script type="text/javascript" src="menudata.js"></script>
59 <script type="text/javascript" src="menu.js"></script>
60 <script type="text/javascript">
61 $(function() {
62   initMenu('',true,false,'search.php','Search');
63   $(document).ready(function() { init_search(); });
64 });
65 </script>
66 <div id="main-nav"></div>
67 </div><!-- top -->
68 <div id="side-nav" class="ui-resizable side-nav-resizable">
69   <div id="nav-tree">
70     <div id="nav-tree-contents">
71       <div id="nav-sync" class="sync"></div>
72     </div>
73   </div>
74   <div id="splitbar" style="-moz-user-select:none;" 
75        class="ui-resizable-handle">
76   </div>
77 </div>
78 <script type="text/javascript">
79 $(document).ready(function(){initNavTree('namespacearmnn_tf_parser.xhtml','');});
80 </script>
81 <div id="doc-content">
82 <!-- window showing the filter options -->
83 <div id="MSearchSelectWindow"
84      onmouseover="return searchBox.OnSearchSelectShow()"
85      onmouseout="return searchBox.OnSearchSelectHide()"
86      onkeydown="return searchBox.OnSearchSelectKey(event)">
87 </div>
88
89 <!-- iframe showing the search results (closed by default) -->
90 <div id="MSearchResultsWindow">
91 <iframe src="javascript:void(0)" frameborder="0" 
92         name="MSearchResults" id="MSearchResults">
93 </iframe>
94 </div>
95
96 <div class="header">
97   <div class="summary">
98 <a href="#nested-classes">Classes</a> &#124;
99 <a href="#typedef-members">Typedefs</a> &#124;
100 <a href="#func-members">Functions</a>  </div>
101   <div class="headertitle">
102 <div class="title">armnnTfParser Namespace Reference</div>  </div>
103 </div><!--header-->
104 <div class="contents">
105 <table class="memberdecls">
106 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
107 Classes</h2></td></tr>
108 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml">ITfParser</a></td></tr>
109 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Parses a directed acyclic graph from a tensorflow protobuf file.  <a href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml#details">More...</a><br /></td></tr>
110 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
111 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_tf_parser_1_1_tf_parser.xhtml">TfParser</a></td></tr>
112 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
113 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a></td></tr>
114 <tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml" title="WithOutputTensorIndex wraps a value and an index. ">WithOutputTensorIndex</a> wraps a value and an index.  <a href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml#details">More...</a><br /></td></tr>
115 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
116 </table><table class="memberdecls">
117 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
118 Typedefs</h2></td></tr>
119 <tr class="memitem:a9084adbf804022c874039ad40d1939e9"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a9084adbf804022c874039ad40d1939e9">BindingPointInfo</a> = <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">armnn::BindingPointInfo</a></td></tr>
120 <tr class="separator:a9084adbf804022c874039ad40d1939e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
121 <tr class="memitem:af7cec8b9a69e02f18a5de38502675d94"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#af7cec8b9a69e02f18a5de38502675d94">ITfParserPtr</a> = std::unique_ptr&lt; <a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml">ITfParser</a>, void(*)(<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml">ITfParser</a> *parser)&gt;</td></tr>
122 <tr class="separator:af7cec8b9a69e02f18a5de38502675d94"><td class="memSeparator" colspan="2">&#160;</td></tr>
123 <tr class="memitem:aa36bf288c19fe35767bb6e059636f405"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#aa36bf288c19fe35767bb6e059636f405">ParsedTfOperationPtr</a> = std::unique_ptr&lt; ParsedTfOperation &gt;</td></tr>
124 <tr class="separator:aa36bf288c19fe35767bb6e059636f405"><td class="memSeparator" colspan="2">&#160;</td></tr>
125 <tr class="memitem:ad85fe4a9bf2aff90c53bc2f50c8931e6"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#ad85fe4a9bf2aff90c53bc2f50c8931e6">OutputOfParsedTfOperation</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt; ParsedTfOperation * &gt;</td></tr>
126 <tr class="separator:ad85fe4a9bf2aff90c53bc2f50c8931e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
127 <tr class="memitem:a4c8735480b01dbd0f75c63377fe054e9"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a4c8735480b01dbd0f75c63377fe054e9">OutputOfConstNodeDef</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt; const tensorflow::NodeDef * &gt;</td></tr>
128 <tr class="separator:a4c8735480b01dbd0f75c63377fe054e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
129 <tr class="memitem:abcf8e5fd95ba7e7bd8cd36fc24974223"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#abcf8e5fd95ba7e7bd8cd36fc24974223">OutputId</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt; std::string &gt;</td></tr>
130 <tr class="separator:abcf8e5fd95ba7e7bd8cd36fc24974223"><td class="memSeparator" colspan="2">&#160;</td></tr>
131 </table><table class="memberdecls">
132 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
133 Functions</h2></td></tr>
134 <tr class="memitem:a0540bb475d62bab024eebe8685181845"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a0540bb475d62bab024eebe8685181845">CalculateSamePadding</a> (uint32_t inputSize, uint32_t stride, uint32_t filterSize, bool samePadding, uint32_t *paddingFront, uint32_t *paddingBack)</td></tr>
135 <tr class="separator:a0540bb475d62bab024eebe8685181845"><td class="memSeparator" colspan="2">&#160;</td></tr>
136 <tr class="memitem:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#aa78bf8d20e213dcd13d48072dfa9cd1f">CalcPadding</a> (uint32_t input, uint32_t kernel, uint32_t stride, uint32_t &amp;outPadHead, uint32_t &amp;outPadTail, bool samePadding)</td></tr>
137 <tr class="separator:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memSeparator" colspan="2">&#160;</td></tr>
138 <tr class="memitem:a3d934e14ca544ba7af4fe562def8a986"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a3d934e14ca544ba7af4fe562def8a986">ConvertTfTensorDataType</a> (const tensorflow::DataType tfDataType, const tensorflow::NodeDef &amp;nodeDef)</td></tr>
139 <tr class="separator:a3d934e14ca544ba7af4fe562def8a986"><td class="memSeparator" colspan="2">&#160;</td></tr>
140 <tr class="memitem:a22ac203831113ee3e429746f6055aa73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a22ac203831113ee3e429746f6055aa73">OutputShapeOfExpandDims</a> (const tensorflow::NodeDef &amp;nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo)</td></tr>
141 <tr class="separator:a22ac203831113ee3e429746f6055aa73"><td class="memSeparator" colspan="2">&#160;</td></tr>
142 <tr class="memitem:ae5488f1478c62281c5e937e79ebcd145"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#ae5488f1478c62281c5e937e79ebcd145">CheckPaddingTensor</a> (const <a class="el" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> &amp;paddingTensor, const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> &amp;inputTensorInfo, const std::string &amp;nodeName)</td></tr>
143 <tr class="separator:ae5488f1478c62281c5e937e79ebcd145"><td class="memSeparator" colspan="2">&#160;</td></tr>
144 <tr class="memitem:a9c18860db8b032de579c5ad94cbae5d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a9c18860db8b032de579c5ad94cbae5d0">CalculatePaddedOutputTensorInfo</a> (const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> &amp;inputTensorInfo, const std::vector&lt; std::pair&lt; unsigned int, unsigned int &gt;&gt; &amp;padList)</td></tr>
145 <tr class="separator:a9c18860db8b032de579c5ad94cbae5d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
146 <tr class="memitem:a6e06adf62d53562032e738b89f3eb37c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a6e06adf62d53562032e738b89f3eb37c">OutputShapeOfSqueeze</a> (const tensorflow::NodeDef &amp;nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo)</td></tr>
147 <tr class="separator:a6e06adf62d53562032e738b89f3eb37c"><td class="memSeparator" colspan="2">&#160;</td></tr>
148 </table>
149 <h2 class="groupheader">Typedef Documentation</h2>
150 <a id="a9084adbf804022c874039ad40d1939e9"></a>
151 <h2 class="memtitle"><span class="permalink"><a href="#a9084adbf804022c874039ad40d1939e9">&#9670;&nbsp;</a></span>BindingPointInfo</h2>
152
153 <div class="memitem">
154 <div class="memproto">
155       <table class="memname">
156         <tr>
157           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#a9084adbf804022c874039ad40d1939e9">BindingPointInfo</a> =  <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">armnn::BindingPointInfo</a></td>
158         </tr>
159       </table>
160 </div><div class="memdoc">
161
162 <p class="definition">Definition at line <a class="el" href="_i_tf_parser_8hpp_source.xhtml#l00019">19</a> of file <a class="el" href="_i_tf_parser_8hpp_source.xhtml">ITfParser.hpp</a>.</p>
163
164 </div>
165 </div>
166 <a id="af7cec8b9a69e02f18a5de38502675d94"></a>
167 <h2 class="memtitle"><span class="permalink"><a href="#af7cec8b9a69e02f18a5de38502675d94">&#9670;&nbsp;</a></span>ITfParserPtr</h2>
168
169 <div class="memitem">
170 <div class="memproto">
171       <table class="memname">
172         <tr>
173           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#af7cec8b9a69e02f18a5de38502675d94">ITfParserPtr</a> =  std::unique_ptr&lt;<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml">ITfParser</a>, void(*)(<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.xhtml">ITfParser</a>* parser)&gt;</td>
174         </tr>
175       </table>
176 </div><div class="memdoc">
177
178 <p class="definition">Definition at line <a class="el" href="_i_tf_parser_8hpp_source.xhtml#l00022">22</a> of file <a class="el" href="_i_tf_parser_8hpp_source.xhtml">ITfParser.hpp</a>.</p>
179
180 </div>
181 </div>
182 <a id="abcf8e5fd95ba7e7bd8cd36fc24974223"></a>
183 <h2 class="memtitle"><span class="permalink"><a href="#abcf8e5fd95ba7e7bd8cd36fc24974223">&#9670;&nbsp;</a></span>OutputId</h2>
184
185 <div class="memitem">
186 <div class="memproto">
187       <table class="memname">
188         <tr>
189           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#abcf8e5fd95ba7e7bd8cd36fc24974223">OutputId</a> =  <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt;std::string&gt;</td>
190         </tr>
191       </table>
192 </div><div class="memdoc">
193
194 <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.xhtml#l00062">62</a> of file <a class="el" href="_tf_parser_8hpp_source.xhtml">TfParser.hpp</a>.</p>
195
196 </div>
197 </div>
198 <a id="a4c8735480b01dbd0f75c63377fe054e9"></a>
199 <h2 class="memtitle"><span class="permalink"><a href="#a4c8735480b01dbd0f75c63377fe054e9">&#9670;&nbsp;</a></span>OutputOfConstNodeDef</h2>
200
201 <div class="memitem">
202 <div class="memproto">
203       <table class="memname">
204         <tr>
205           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#a4c8735480b01dbd0f75c63377fe054e9">OutputOfConstNodeDef</a> =  <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt;const tensorflow::NodeDef*&gt;</td>
206         </tr>
207       </table>
208 </div><div class="memdoc">
209
210 <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.xhtml#l00061">61</a> of file <a class="el" href="_tf_parser_8hpp_source.xhtml">TfParser.hpp</a>.</p>
211
212 </div>
213 </div>
214 <a id="ad85fe4a9bf2aff90c53bc2f50c8931e6"></a>
215 <h2 class="memtitle"><span class="permalink"><a href="#ad85fe4a9bf2aff90c53bc2f50c8931e6">&#9670;&nbsp;</a></span>OutputOfParsedTfOperation</h2>
216
217 <div class="memitem">
218 <div class="memproto">
219       <table class="memname">
220         <tr>
221           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#ad85fe4a9bf2aff90c53bc2f50c8931e6">OutputOfParsedTfOperation</a> =  <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.xhtml">WithOutputTensorIndex</a>&lt;ParsedTfOperation *&gt;</td>
222         </tr>
223       </table>
224 </div><div class="memdoc">
225
226 <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.xhtml#l00060">60</a> of file <a class="el" href="_tf_parser_8hpp_source.xhtml">TfParser.hpp</a>.</p>
227
228 </div>
229 </div>
230 <a id="aa36bf288c19fe35767bb6e059636f405"></a>
231 <h2 class="memtitle"><span class="permalink"><a href="#aa36bf288c19fe35767bb6e059636f405">&#9670;&nbsp;</a></span>ParsedTfOperationPtr</h2>
232
233 <div class="memitem">
234 <div class="memproto">
235       <table class="memname">
236         <tr>
237           <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.xhtml#aa36bf288c19fe35767bb6e059636f405">ParsedTfOperationPtr</a> =  std::unique_ptr&lt;ParsedTfOperation&gt;</td>
238         </tr>
239       </table>
240 </div><div class="memdoc">
241
242 <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.xhtml#l00035">35</a> of file <a class="el" href="_tf_parser_8hpp_source.xhtml">TfParser.hpp</a>.</p>
243
244 </div>
245 </div>
246 <h2 class="groupheader">Function Documentation</h2>
247 <a id="aa78bf8d20e213dcd13d48072dfa9cd1f"></a>
248 <h2 class="memtitle"><span class="permalink"><a href="#aa78bf8d20e213dcd13d48072dfa9cd1f">&#9670;&nbsp;</a></span>CalcPadding()</h2>
249
250 <div class="memitem">
251 <div class="memproto">
252       <table class="memname">
253         <tr>
254           <td class="memname">void armnnTfParser::CalcPadding </td>
255           <td>(</td>
256           <td class="paramtype">uint32_t&#160;</td>
257           <td class="paramname"><em>input</em>, </td>
258         </tr>
259         <tr>
260           <td class="paramkey"></td>
261           <td></td>
262           <td class="paramtype">uint32_t&#160;</td>
263           <td class="paramname"><em>kernel</em>, </td>
264         </tr>
265         <tr>
266           <td class="paramkey"></td>
267           <td></td>
268           <td class="paramtype">uint32_t&#160;</td>
269           <td class="paramname"><em>stride</em>, </td>
270         </tr>
271         <tr>
272           <td class="paramkey"></td>
273           <td></td>
274           <td class="paramtype">uint32_t &amp;&#160;</td>
275           <td class="paramname"><em>outPadHead</em>, </td>
276         </tr>
277         <tr>
278           <td class="paramkey"></td>
279           <td></td>
280           <td class="paramtype">uint32_t &amp;&#160;</td>
281           <td class="paramname"><em>outPadTail</em>, </td>
282         </tr>
283         <tr>
284           <td class="paramkey"></td>
285           <td></td>
286           <td class="paramtype">bool&#160;</td>
287           <td class="paramname"><em>samePadding</em>&#160;</td>
288         </tr>
289         <tr>
290           <td></td>
291           <td>)</td>
292           <td></td><td></td>
293         </tr>
294       </table>
295 </div><div class="memdoc">
296
297 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l00421">421</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
298
299 <p class="reference">References <a class="el" href="_tf_parser_8cpp_source.xhtml#l00405">CalculateSamePadding()</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00308">Layer::GetNumOutputSlots()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00242">m_Layer</a>.</p>
300
301 <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.xhtml#l00933">ConvertTfTensorDataType()</a>, <a class="el" href="_tf_lite_parser_8cpp_source.xhtml#l00605">TfLiteParser::CreateNetworkFromBinary()</a>, <a class="el" href="_onnx_parser_8cpp_source.xhtml#l00584">OnnxParser::CreateNetworkFromString()</a>, and <a class="el" href="_tf_parser_8cpp_source.xhtml#l02463">OutputShapeOfSqueeze()</a>.</p>
302 <div class="fragment"><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;{</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;    <a class="code" href="namespacearmnn_tf_parser.xhtml#a0540bb475d62bab024eebe8685181845">CalculateSamePadding</a>(input, stride, kernel, samePadding, &amp;outPadHead, &amp;outPadTail);</div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;}</div><div class="ttc" id="namespacearmnn_tf_parser_xhtml_a0540bb475d62bab024eebe8685181845"><div class="ttname"><a href="namespacearmnn_tf_parser.xhtml#a0540bb475d62bab024eebe8685181845">armnnTfParser::CalculateSamePadding</a></div><div class="ttdeci">void CalculateSamePadding(uint32_t inputSize, uint32_t stride, uint32_t filterSize, bool samePadding, uint32_t *paddingFront, uint32_t *paddingBack)</div><div class="ttdef"><b>Definition:</b> <a href="_tf_parser_8cpp_source.xhtml#l00405">TfParser.cpp:405</a></div></div>
303 </div><!-- fragment -->
304 </div>
305 </div>
306 <a id="a9c18860db8b032de579c5ad94cbae5d0"></a>
307 <h2 class="memtitle"><span class="permalink"><a href="#a9c18860db8b032de579c5ad94cbae5d0">&#9670;&nbsp;</a></span>CalculatePaddedOutputTensorInfo()</h2>
308
309 <div class="memitem">
310 <div class="memproto">
311       <table class="memname">
312         <tr>
313           <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> armnnTfParser::CalculatePaddedOutputTensorInfo </td>
314           <td>(</td>
315           <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td>
316           <td class="paramname"><em>inputTensorInfo</em>, </td>
317         </tr>
318         <tr>
319           <td class="paramkey"></td>
320           <td></td>
321           <td class="paramtype">const std::vector&lt; std::pair&lt; unsigned int, unsigned int &gt;&gt; &amp;&#160;</td>
322           <td class="paramname"><em>padList</em>&#160;</td>
323         </tr>
324         <tr>
325           <td></td>
326           <td>)</td>
327           <td></td><td></td>
328         </tr>
329       </table>
330 </div><div class="memdoc">
331
332 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l02138">2138</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
333
334 <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.xhtml#aef27f787e8a2ee19c4052261f963f28e">INetwork::AddConcatLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a07485f1477554d32e43edc39502ac419">INetwork::AddPadLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a617aeb663e1535568864c23f5d988dd8">INetwork::AddResizeLayer()</a>, <a class="el" href="namespacearmnn.xhtml#a9a2af2f8c4af4f9efa8e79417d505ac4aaf17c98bbd83c27d6426d2ff3fa81d7f">armnn::Bilinear</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l02106">CheckPaddingTensor()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00189">OriginsDescriptor::GetViewOrigin()</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00751">ResizeDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00749">ResizeDescriptor::m_Method</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00746">ResizeDescriptor::m_TargetHeight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00744">ResizeDescriptor::m_TargetWidth</a>, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00150">OriginsDescriptor::SetConcatAxis()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00090">TensorInfo::SetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, and <a class="el" href="_descriptors_8cpp_source.xhtml#l00159">OriginsDescriptor::SetViewOriginCoord()</a>.</p>
335 <div class="fragment"><div class="line"><a name="l02140"></a><span class="lineno"> 2140</span>&#160;{</div><div class="line"><a name="l02141"></a><span class="lineno"> 2141</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numDims = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>();</div><div class="line"><a name="l02142"></a><span class="lineno"> 2142</span>&#160;    std::vector&lt;unsigned int&gt; outDims;</div><div class="line"><a name="l02143"></a><span class="lineno"> 2143</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; numDims; ++i)</div><div class="line"><a name="l02144"></a><span class="lineno"> 2144</span>&#160;    {</div><div class="line"><a name="l02145"></a><span class="lineno"> 2145</span>&#160;        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dimSize = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l02146"></a><span class="lineno"> 2146</span>&#160;        <span class="keyword">const</span> std::pair&lt;unsigned int, unsigned int&gt;&amp; dimPadding = padList[i];</div><div class="line"><a name="l02147"></a><span class="lineno"> 2147</span>&#160;        dimSize += dimPadding.first;</div><div class="line"><a name="l02148"></a><span class="lineno"> 2148</span>&#160;        dimSize += dimPadding.second;</div><div class="line"><a name="l02149"></a><span class="lineno"> 2149</span>&#160;        outDims.push_back(dimSize);</div><div class="line"><a name="l02150"></a><span class="lineno"> 2150</span>&#160;    }</div><div class="line"><a name="l02151"></a><span class="lineno"> 2151</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> paddedTensorInfo = inputTensorInfo;</div><div class="line"><a name="l02152"></a><span class="lineno"> 2152</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outDimsSize = <span class="keyword">static_cast&lt;</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">&gt;</span>(outDims.size());</div><div class="line"><a name="l02153"></a><span class="lineno"> 2153</span>&#160;    paddedTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(<a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>{ outDimsSize, outDims.data() });</div><div class="line"><a name="l02154"></a><span class="lineno"> 2154</span>&#160;    <span class="keywordflow">return</span> paddedTensorInfo;</div><div class="line"><a name="l02155"></a><span class="lineno"> 2155</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape &amp; GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div>
336 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div>
337 <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div>
338 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &amp;newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00090">Tensor.hpp:90</a></div></div>
339 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div>
340 </div><!-- fragment -->
341 </div>
342 </div>
343 <a id="a0540bb475d62bab024eebe8685181845"></a>
344 <h2 class="memtitle"><span class="permalink"><a href="#a0540bb475d62bab024eebe8685181845">&#9670;&nbsp;</a></span>CalculateSamePadding()</h2>
345
346 <div class="memitem">
347 <div class="memproto">
348 <table class="mlabels">
349   <tr>
350   <td class="mlabels-left">
351       <table class="memname">
352         <tr>
353           <td class="memname">void armnnTfParser::CalculateSamePadding </td>
354           <td>(</td>
355           <td class="paramtype">uint32_t&#160;</td>
356           <td class="paramname"><em>inputSize</em>, </td>
357         </tr>
358         <tr>
359           <td class="paramkey"></td>
360           <td></td>
361           <td class="paramtype">uint32_t&#160;</td>
362           <td class="paramname"><em>stride</em>, </td>
363         </tr>
364         <tr>
365           <td class="paramkey"></td>
366           <td></td>
367           <td class="paramtype">uint32_t&#160;</td>
368           <td class="paramname"><em>filterSize</em>, </td>
369         </tr>
370         <tr>
371           <td class="paramkey"></td>
372           <td></td>
373           <td class="paramtype">bool&#160;</td>
374           <td class="paramname"><em>samePadding</em>, </td>
375         </tr>
376         <tr>
377           <td class="paramkey"></td>
378           <td></td>
379           <td class="paramtype">uint32_t *&#160;</td>
380           <td class="paramname"><em>paddingFront</em>, </td>
381         </tr>
382         <tr>
383           <td class="paramkey"></td>
384           <td></td>
385           <td class="paramtype">uint32_t *&#160;</td>
386           <td class="paramname"><em>paddingBack</em>&#160;</td>
387         </tr>
388         <tr>
389           <td></td>
390           <td>)</td>
391           <td></td><td></td>
392         </tr>
393       </table>
394   </td>
395   <td class="mlabels-right">
396 <span class="mlabels"><span class="mlabel">inline</span></span>  </td>
397   </tr>
398 </table>
399 </div><div class="memdoc">
400
401 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l00405">405</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
402
403 <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.xhtml#l00421">CalcPadding()</a>.</p>
404 <div class="fragment"><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;                                                                                {</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;    *paddingFront = 0;</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;    *paddingBack = 0;</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <span class="keywordflow">if</span> (samePadding) {</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;        uint32_t outputSize = (inputSize + stride - 1) / stride;</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        uint32_t temp = (outputSize - 1) * stride + filterSize;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        <span class="keywordflow">if</span> (temp &gt; inputSize) {</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;            *paddingFront = (temp - inputSize) / 2;</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;            *paddingBack = (temp - inputSize) - *paddingFront;</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        }</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;    }</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;}</div></div><!-- fragment -->
405 </div>
406 </div>
407 <a id="ae5488f1478c62281c5e937e79ebcd145"></a>
408 <h2 class="memtitle"><span class="permalink"><a href="#ae5488f1478c62281c5e937e79ebcd145">&#9670;&nbsp;</a></span>CheckPaddingTensor()</h2>
409
410 <div class="memitem">
411 <div class="memproto">
412       <table class="memname">
413         <tr>
414           <td class="memname">unsigned int armnnTfParser::CheckPaddingTensor </td>
415           <td>(</td>
416           <td class="paramtype">const <a class="el" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> &amp;&#160;</td>
417           <td class="paramname"><em>paddingTensor</em>, </td>
418         </tr>
419         <tr>
420           <td class="paramkey"></td>
421           <td></td>
422           <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> &amp;&#160;</td>
423           <td class="paramname"><em>inputTensorInfo</em>, </td>
424         </tr>
425         <tr>
426           <td class="paramkey"></td>
427           <td></td>
428           <td class="paramtype">const std::string &amp;&#160;</td>
429           <td class="paramname"><em>nodeName</em>&#160;</td>
430         </tr>
431         <tr>
432           <td></td>
433           <td>)</td>
434           <td></td><td></td>
435         </tr>
436       </table>
437 </div><div class="memdoc">
438
439 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l02106">2106</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
440
441 <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, and <a class="el" href="_tensor_8hpp_source.xhtml#l00169">BaseTensor&lt; MemoryType &gt;::GetShape()</a>.</p>
442
443 <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.xhtml#l02138">CalculatePaddedOutputTensorInfo()</a>.</p>
444 <div class="fragment"><div class="line"><a name="l02109"></a><span class="lineno"> 2109</span>&#160;{</div><div class="line"><a name="l02110"></a><span class="lineno"> 2110</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rank = paddingTensor.<a class="code" href="classarmnn_1_1_base_tensor.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[0];</div><div class="line"><a name="l02111"></a><span class="lineno"> 2111</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> expectedRank = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>();</div><div class="line"><a name="l02112"></a><span class="lineno"> 2112</span>&#160;    <span class="keywordflow">if</span> (rank != expectedRank)</div><div class="line"><a name="l02113"></a><span class="lineno"> 2113</span>&#160;    {</div><div class="line"><a name="l02114"></a><span class="lineno"> 2114</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l02115"></a><span class="lineno"> 2115</span>&#160;                boost::str(</div><div class="line"><a name="l02116"></a><span class="lineno"> 2116</span>&#160;                        boost::format(</div><div class="line"><a name="l02117"></a><span class="lineno"> 2117</span>&#160;                                <span class="stringliteral">&quot;Expected the padding tensor to be of rank %1 not %2 on Node %3 %4.&quot;</span>)</div><div class="line"><a name="l02118"></a><span class="lineno"> 2118</span>&#160;                        % expectedRank</div><div class="line"><a name="l02119"></a><span class="lineno"> 2119</span>&#160;                        % rank</div><div class="line"><a name="l02120"></a><span class="lineno"> 2120</span>&#160;                        % nodeName</div><div class="line"><a name="l02121"></a><span class="lineno"> 2121</span>&#160;                        % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02122"></a><span class="lineno"> 2122</span>&#160;    }</div><div class="line"><a name="l02123"></a><span class="lineno"> 2123</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> second = paddingTensor.<a class="code" href="classarmnn_1_1_base_tensor.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l02124"></a><span class="lineno"> 2124</span>&#160;    <span class="keywordflow">if</span> (second != 2)</div><div class="line"><a name="l02125"></a><span class="lineno"> 2125</span>&#160;    {</div><div class="line"><a name="l02126"></a><span class="lineno"> 2126</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l02127"></a><span class="lineno"> 2127</span>&#160;                boost::str(</div><div class="line"><a name="l02128"></a><span class="lineno"> 2128</span>&#160;                        boost::format(</div><div class="line"><a name="l02129"></a><span class="lineno"> 2129</span>&#160;                                <span class="stringliteral">&quot;Expected the padding tensor to be of dimensions [%1, 2] not [%1, %2] on Node %3 %4.&quot;</span>)</div><div class="line"><a name="l02130"></a><span class="lineno"> 2130</span>&#160;                        % rank</div><div class="line"><a name="l02131"></a><span class="lineno"> 2131</span>&#160;                        % second</div><div class="line"><a name="l02132"></a><span class="lineno"> 2132</span>&#160;                        % nodeName</div><div class="line"><a name="l02133"></a><span class="lineno"> 2133</span>&#160;                        % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02134"></a><span class="lineno"> 2134</span>&#160;    }</div><div class="line"><a name="l02135"></a><span class="lineno"> 2135</span>&#160;    <span class="keywordflow">return</span> rank;</div><div class="line"><a name="l02136"></a><span class="lineno"> 2136</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_base_tensor_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_base_tensor.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::BaseTensor::GetShape</a></div><div class="ttdeci">const TensorShape &amp; GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00169">Tensor.hpp:169</a></div></div>
445 <div class="ttc" id="_exceptions_8hpp_xhtml_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00192">Exceptions.hpp:192</a></div></div>
446 <div class="ttc" id="classarmnn_1_1_parse_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_parse_exception.xhtml">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00092">Exceptions.hpp:92</a></div></div>
447 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div>
448 </div><!-- fragment -->
449 </div>
450 </div>
451 <a id="a3d934e14ca544ba7af4fe562def8a986"></a>
452 <h2 class="memtitle"><span class="permalink"><a href="#a3d934e14ca544ba7af4fe562def8a986">&#9670;&nbsp;</a></span>ConvertTfTensorDataType()</h2>
453
454 <div class="memitem">
455 <div class="memproto">
456       <table class="memname">
457         <tr>
458           <td class="memname"><a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> armnnTfParser::ConvertTfTensorDataType </td>
459           <td>(</td>
460           <td class="paramtype">const tensorflow::DataType&#160;</td>
461           <td class="paramname"><em>tfDataType</em>, </td>
462         </tr>
463         <tr>
464           <td class="paramkey"></td>
465           <td></td>
466           <td class="paramtype">const tensorflow::NodeDef &amp;&#160;</td>
467           <td class="paramname"><em>nodeDef</em>&#160;</td>
468         </tr>
469         <tr>
470           <td></td>
471           <td>)</td>
472           <td></td><td></td>
473         </tr>
474       </table>
475 </div><div class="memdoc">
476
477 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l00933">933</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
478
479 <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.xhtml#a073e2f61f527d7d3801c26bdbd37dd7e">INetwork::AddConvolution2dLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a78367a5054c92d435f4f5c7e10ec65b8">INetwork::AddDepthwiseConvolution2dLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00421">CalcPadding()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00314">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00328">CHECK_PADDING_TYPE</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_types_utils_8hpp_source.xhtml#l00115">armnn::GetDataTypeSize()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.xhtml#l00024">DataLayoutIndexed::GetHeightIndex()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00093">TensorInfo::GetNumElements()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00169">BaseTensor&lt; MemoryType &gt;::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.xhtml#l00025">DataLayoutIndexed::GetWidthIndex()</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00438">Convolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00490">DepthwiseConvolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00440">Convolution2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00492">DepthwiseConvolution2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00428">Convolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00480">DepthwiseConvolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00422">Convolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00474">DepthwiseConvolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00424">Convolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00476">DepthwiseConvolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00426">Convolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00478">DepthwiseConvolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00430">Convolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00482">DepthwiseConvolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00432">Convolution2dDescriptor::m_StrideY</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00484">DepthwiseConvolution2dDescriptor::m_StrideY</a>, <a class="el" href="_permute_8cpp_source.xhtml#l00121">armnnUtils::Permute()</a>, <a class="el" href="_permute_8cpp_source.xhtml#l00098">armnnUtils::Permuted()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p>
480 <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;    <span class="keywordflow">switch</span> (tfDataType)</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;    <span class="keywordflow">case</span> tensorflow::DT_FLOAT:</div><div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;        <span class="keywordflow">return</span> DataType::Float32;</div><div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;    <span class="keywordflow">case</span> tensorflow::DT_INT32:</div><div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;        <span class="keywordflow">return</span> DataType::Signed32;</div><div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;        <span class="keywordflow">break</span>;</div><div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;    <span class="keywordflow">default</span>:</div><div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;            boost::str(</div><div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;                boost::format(</div><div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;                    <span class="stringliteral">&quot;Unknown DataType %1% for node %2% %3%&quot;</span>)</div><div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;                    % tensorflow::DataType_Name(tfDataType)</div><div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;                    % nodeDef.name()</div><div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;                    % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;    }</div><div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;}</div><div class="ttc" id="_exceptions_8hpp_xhtml_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00192">Exceptions.hpp:192</a></div></div>
481 <div class="ttc" id="classarmnn_1_1_parse_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_parse_exception.xhtml">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00092">Exceptions.hpp:92</a></div></div>
482 </div><!-- fragment -->
483 </div>
484 </div>
485 <a id="a22ac203831113ee3e429746f6055aa73"></a>
486 <h2 class="memtitle"><span class="permalink"><a href="#a22ac203831113ee3e429746f6055aa73">&#9670;&nbsp;</a></span>OutputShapeOfExpandDims()</h2>
487
488 <div class="memitem">
489 <div class="memproto">
490       <table class="memname">
491         <tr>
492           <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> armnnTfParser::OutputShapeOfExpandDims </td>
493           <td>(</td>
494           <td class="paramtype">const tensorflow::NodeDef &amp;&#160;</td>
495           <td class="paramname"><em>nodeDef</em>, </td>
496         </tr>
497         <tr>
498           <td class="paramkey"></td>
499           <td></td>
500           <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td>
501           <td class="paramname"><em>inputTensorInfo</em>&#160;</td>
502         </tr>
503         <tr>
504           <td></td>
505           <td>)</td>
506           <td></td><td></td>
507         </tr>
508       </table>
509 </div><div class="memdoc">
510
511 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l01468">1468</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
512
513 <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.xhtml#aea068f6094e1c3bfcdf8167b68112632">INetwork::AddActivationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a8d1067e754512c434da1238b67ad26ea">INetwork::AddBatchNormalizationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ac3be1bcc0fa5ffaf04a4f1d20d0ab7f4">INetwork::AddComparisonLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a8440d2a2afd3eb3526212081c9016830">INetwork::AddGatherLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a4cc12e3bd9ffe196cc8b351f25a104e3">INetwork::AddMinimumLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#afaa808f44f0b8332ec0bd54f4fea47c0">INetwork::AddStackLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ab6d332d9c4b4f04c23f40f04f7f56d0d">INetwork::AddSubtractionLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a4f6070c1337d40f1e98988acee015c7d">INetwork::AddTransposeLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00314">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00043">TensorShape::GetNumDimensions()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00037">ActivationDescriptor::m_A</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00972">StackDescriptor::m_Axis</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00625">BatchNormalizationDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00623">BatchNormalizationDescriptor::m_Eps</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00035">ActivationDescriptor::m_Function</a>, <a class="el" href="_tf_parser_8hpp_source.xhtml#l00049">WithOutputTensorIndex&lt; T &gt;::m_Index</a>, <a class="el" href="_tf_parser_8hpp_source.xhtml#l00048">WithOutputTensorIndex&lt; T &gt;::m_IndexedValue</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00976">StackDescriptor::m_InputShape</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00974">StackDescriptor::m_NumInputs</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00096">TensorInfo::SetDataType()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00090">TensorInfo::SetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, and <a class="el" href="armnn_utils_2_transpose_8cpp_source.xhtml#l00098">armnnUtils::TransposeTensorShape()</a>.</p>
514 <div class="fragment"><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span>&#160;{</div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>&#160;    BOOST_ASSERT(nodeDef.op() == <span class="stringliteral">&quot;ExpandDims&quot;</span>);</div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>&#160;</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>&#160;    <span class="keywordflow">if</span> (inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>() &gt; 4) {</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>&#160;                boost::str(</div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>&#160;                        boost::format(</div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>&#160;                                <span class="stringliteral">&quot;Unsupported number of dimensions: %1% for input shape for ExpandDims %2% %3%&quot;</span>)</div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>&#160;                        % inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>()</div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>&#160;                        % nodeDef.name()</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span>&#160;                        % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>&#160;    }</div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span>&#160;</div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>&#160;    std::int32_t expandDim = ReadMandatoryNodeInt32Attribute(nodeDef, <span class="stringliteral">&quot;Tdim&quot;</span>);</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>&#160;</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>&#160;    std::int32_t inputDimSize = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a>&lt;int32_t&gt;(inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>());</div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>&#160;    std::vector&lt;uint32_t&gt; outputDims;</div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>&#160;</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>&#160;    <span class="comment">// expandDim operation requires: -1-input.dims() &lt;= dim &lt;= input.dims()</span></div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>&#160;    <span class="keywordflow">if</span> (expandDim &gt;= -1 - inputDimSize &amp;&amp; expandDim &lt;= inputDimSize)</div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>&#160;    {</div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>&#160;        <span class="comment">// add current input shape to outputDims</span></div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>(); ++i) {</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>&#160;            <span class="keyword">auto</span> currentDimension = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span>&#160;            outputDims.push_back(currentDimension);</div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>&#160;        }</div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>&#160;</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>&#160;        <span class="comment">// insert a dimension of 1 at index &#39;expandDim&#39; of inputs shape</span></div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>&#160;        <span class="keywordflow">if</span> (expandDim &gt;= 0)</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>&#160;        {</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>&#160;            <span class="keyword">auto</span> getPosition = std::next(outputDims.begin() + 0, expandDim);</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span>&#160;            outputDims.insert(getPosition, 1);</div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>&#160;        }</div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>&#160;</div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>&#160;        <span class="comment">// if negative number for &#39;expandDim&#39; then count backwards from the last element</span></div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>&#160;        <span class="comment">// and insert 1 dimension at index &#39;expandDim&#39;</span></div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>&#160;        <span class="keywordflow">if</span> (expandDim &lt; 0)</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>&#160;        {</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>&#160;            <span class="keywordtype">int</span> outputDimSize = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a>&lt;<span class="keywordtype">int</span>&gt;(outputDims.size() + 1);</div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>&#160;            <span class="keyword">auto</span> getPosition = std::next(outputDims.begin() + outputDimSize, expandDim);</div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>&#160;            outputDims.insert(getPosition, 1);</div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>&#160;        }</div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>&#160;    }</div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>&#160;    {</div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">InvalidArgumentException</a>(</div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>&#160;                boost::str(</div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>&#160;                        boost::format(</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>&#160;                                <span class="stringliteral">&quot;Cannot expand dimension %1% in input tensor with %2% dimension %3%&quot;</span>)</div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>&#160;                        % expandDim</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>&#160;                        % inputDimSize</div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span>&#160;                        % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>&#160;    }</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>&#160;</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>&#160;    <span class="keywordflow">if</span> (outputDims.size() &gt; 4)</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>&#160;    {</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>&#160;                boost::str(</div><div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>&#160;                        boost::format(</div><div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>&#160;                                <span class="stringliteral">&quot;Unsupported number of dimensions: %1% for output shape for ExpandDims %2% %3%&quot;</span>)</div><div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>&#160;                        % outputDims.size()</div><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>&#160;                        % nodeDef.name()</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span>&#160;                        % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>&#160;    }</div><div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>&#160;</div><div class="line"><a name="l01534"></a><span class="lineno"> 1534</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a> outShape = <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>(static_cast&lt;unsigned int&gt;(outputDims.size()),</div><div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>&#160;                                       outputDims.data());</div><div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>&#160;</div><div class="line"><a name="l01537"></a><span class="lineno"> 1537</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> outTensorInfo = inputTensorInfo;</div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>&#160;    outTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(outShape);</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>&#160;</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>&#160;    <span class="keywordflow">return</span> outTensorInfo;</div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape &amp; GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div>
515 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div>
516 <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div>
517 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &amp;newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00090">Tensor.hpp:90</a></div></div>
518 <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t&lt; std::is_unsigned&lt; Source &gt;::value &amp;&amp;std::is_unsigned&lt; Dest &gt;::value, Dest &gt; numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div>
519 <div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div>
520 <div class="ttc" id="_exceptions_8hpp_xhtml_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00192">Exceptions.hpp:192</a></div></div>
521 <div class="ttc" id="classarmnn_1_1_parse_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_parse_exception.xhtml">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00092">Exceptions.hpp:92</a></div></div>
522 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div>
523 </div><!-- fragment -->
524 </div>
525 </div>
526 <a id="a6e06adf62d53562032e738b89f3eb37c"></a>
527 <h2 class="memtitle"><span class="permalink"><a href="#a6e06adf62d53562032e738b89f3eb37c">&#9670;&nbsp;</a></span>OutputShapeOfSqueeze()</h2>
528
529 <div class="memitem">
530 <div class="memproto">
531       <table class="memname">
532         <tr>
533           <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> armnnTfParser::OutputShapeOfSqueeze </td>
534           <td>(</td>
535           <td class="paramtype">const tensorflow::NodeDef &amp;&#160;</td>
536           <td class="paramname"><em>nodeDef</em>, </td>
537         </tr>
538         <tr>
539           <td class="paramkey"></td>
540           <td></td>
541           <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>&#160;</td>
542           <td class="paramname"><em>inputTensorInfo</em>&#160;</td>
543         </tr>
544         <tr>
545           <td></td>
546           <td>)</td>
547           <td></td><td></td>
548         </tr>
549       </table>
550 </div><div class="memdoc">
551
552 <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l02463">2463</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p>
553
554 <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.xhtml#aea068f6094e1c3bfcdf8167b68112632">INetwork::AddActivationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a4812e0137ee610310d23059efed2cb84">INetwork::AddAdditionLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a82a5bc0d24f4c4eb1fbf793e156a5193">INetwork::AddDivisionLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a5bf8e0c150c7e6f8085c0767c6ab1914">INetwork::AddElementwiseUnaryLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a4839e4ec3f07974c57ca2c856b40cd57">INetwork::AddFullyConnectedLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a87d5ec72def73ca14bd2987a024bd569">INetwork::AddInputLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#afb8d4577c796ffdd213428cd285734b1">INetwork::AddMaximumLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a8262e9e6fc869a9c9782115a6a552f36">INetwork::AddMeanLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ae24e82cf1ae2a71c5cd976edfb192fc0">INetwork::AddMultiplicationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a74dac9efbb6dbd1982a45af1805eb4e0">INetwork::AddNormalizationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ad8582fba2ebeb65da43a56bc22d4f88b">INetwork::AddOutputLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a4ec92bca4e51755105abb89e1878585f">INetwork::AddPooling2dLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a53949668a151924c4aad83b176db1080">INetwork::AddSoftmaxLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a3a2dbac031f1a0b1b323916b1c7f61d2">INetwork::AddSplitterLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.xhtml#a348f95b60998a987ba20a58bfc720590">INetwork::AddStridedSliceLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00421">CalcPadding()</a>, <a class="el" href="_parser_helper_8cpp_source.xhtml#l00054">armnnUtils::CalculateReducedOutputTensoInfo()</a>, <a class="el" href="_parser_helper_8cpp_source.xhtml#l00105">armnnUtils::CalculateStridedSliceOutputTensorInfo()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00314">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l00328">CHECK_PADDING_TYPE</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.xhtml#l00024">DataLayoutIndexed::GetHeightIndex()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00043">TensorShape::GetNumDimensions()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#ac2dac3b61c94de52093616be4ab17f8d">IConnectableLayer::GetNumOutputSlots()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00169">BaseTensor&lt; MemoryType &gt;::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.xhtml#l00025">DataLayoutIndexed::GetWidthIndex()</a>, <a class="el" href="_ignore_unused_8hpp_source.xhtml#l00014">armnn::IgnoreUnused()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00037">ActivationDescriptor::m_A</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00581">NormalizationDescriptor::m_Alpha</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00895">MeanDescriptor::m_Axis</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00039">ActivationDescriptor::m_B</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01041">StridedSliceDescriptor::m_Begin</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01049">StridedSliceDescriptor::m_BeginMask</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00583">NormalizationDescriptor::m_Beta</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00386">FullyConnectedDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00369">Pooling2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00587">NormalizationDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01062">StridedSliceDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01056">StridedSliceDescriptor::m_EllipsisMask</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01043">StridedSliceDescriptor::m_End</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01052">StridedSliceDescriptor::m_EndMask</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00035">ActivationDescriptor::m_Function</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00585">NormalizationDescriptor::m_K</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00897">MeanDescriptor::m_KeepDims</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.xhtml#l00242">m_Layer</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01059">StridedSliceDescriptor::m_NewAxisMask</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00575">NormalizationDescriptor::m_NormChannelType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00577">NormalizationDescriptor::m_NormMethodType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00579">NormalizationDescriptor::m_NormSize</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00365">Pooling2dDescriptor::m_OutputShapeRounding</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00355">Pooling2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00367">Pooling2dDescriptor::m_PaddingMethod</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00349">Pooling2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00351">Pooling2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00353">Pooling2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00359">Pooling2dDescriptor::m_PoolHeight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00347">Pooling2dDescriptor::m_PoolType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00357">Pooling2dDescriptor::m_PoolWidth</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01054">StridedSliceDescriptor::m_ShrinkAxisMask</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l01045">StridedSliceDescriptor::m_Stride</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00361">Pooling2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00363">Pooling2dDescriptor::m_StrideY</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="namespacearmnn.xhtml#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_tf_parser_8hpp_source.xhtml#l00097">TfParser::ParsedMatMulTfOperation</a>, <a class="el" href="_tf_parser_8hpp_source.xhtml#l00098">TfParser::ParsedMulTfOperation</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00090">TensorInfo::SetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00302">ViewsDescriptor::SetViewOriginCoord()</a>, and <a class="el" href="_descriptors_8cpp_source.xhtml#l00307">ViewsDescriptor::SetViewSize()</a>.</p>
555 <div class="fragment"><div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>&#160;{</div><div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>&#160;    BOOST_ASSERT(nodeDef.op() == <span class="stringliteral">&quot;Squeeze&quot;</span>);</div><div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>&#160;    <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">tensorflow::DataType</a> tfDataType = ReadMandatoryNodeTypeAttribute(nodeDef, <span class="stringliteral">&quot;T&quot;</span>);</div><div class="line"><a name="l02467"></a><span class="lineno"> 2467</span>&#160;</div><div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>&#160;    <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> type;</div><div class="line"><a name="l02469"></a><span class="lineno"> 2469</span>&#160;    <span class="keywordflow">if</span> (tfDataType == tensorflow::DT_FLOAT)</div><div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>&#160;    {</div><div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>&#160;        type = DataType::Float32;</div><div class="line"><a name="l02472"></a><span class="lineno"> 2472</span>&#160;    }</div><div class="line"><a name="l02473"></a><span class="lineno"> 2473</span>&#160;    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tfDataType == tensorflow::DT_INT32)</div><div class="line"><a name="l02474"></a><span class="lineno"> 2474</span>&#160;    {</div><div class="line"><a name="l02475"></a><span class="lineno"> 2475</span>&#160;        type = DataType::Signed32;</div><div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>&#160;    }</div><div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>&#160;    {</div><div class="line"><a name="l02479"></a><span class="lineno"> 2479</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l02480"></a><span class="lineno"> 2480</span>&#160;            boost::str(</div><div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>&#160;                boost::format(<span class="stringliteral">&quot;Unsupported DataType %1% for Squeeze operation %2% %3%&quot;</span>)</div><div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>&#160;                % tensorflow::DataType_Name(tfDataType)</div><div class="line"><a name="l02483"></a><span class="lineno"> 2483</span>&#160;                % nodeDef.name()</div><div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>&#160;                % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>&#160;    }</div><div class="line"><a name="l02486"></a><span class="lineno"> 2486</span>&#160;</div><div class="line"><a name="l02487"></a><span class="lineno"> 2487</span>&#160;</div><div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>&#160;    <span class="keywordflow">if</span> (inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>() &gt; 4)</div><div class="line"><a name="l02489"></a><span class="lineno"> 2489</span>&#160;    {</div><div class="line"><a name="l02490"></a><span class="lineno"> 2490</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l02491"></a><span class="lineno"> 2491</span>&#160;            boost::str(</div><div class="line"><a name="l02492"></a><span class="lineno"> 2492</span>&#160;                boost::format(</div><div class="line"><a name="l02493"></a><span class="lineno"> 2493</span>&#160;                    <span class="stringliteral">&quot;Unsupported number of dimensions: %1% for input shape for Squeeze %2% %3%&quot;</span>)</div><div class="line"><a name="l02494"></a><span class="lineno"> 2494</span>&#160;                    % inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>()</div><div class="line"><a name="l02495"></a><span class="lineno"> 2495</span>&#160;                    % nodeDef.name()</div><div class="line"><a name="l02496"></a><span class="lineno"> 2496</span>&#160;                    % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02497"></a><span class="lineno"> 2497</span>&#160;    }</div><div class="line"><a name="l02498"></a><span class="lineno"> 2498</span>&#160;</div><div class="line"><a name="l02499"></a><span class="lineno"> 2499</span>&#160;    std::vector&lt;uint32_t&gt; squeezeDims = ReadOptionalNodeUint32ListAttribute(nodeDef, <span class="stringliteral">&quot;squeeze_dims&quot;</span>);</div><div class="line"><a name="l02500"></a><span class="lineno"> 2500</span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> uint32_t dimensionSequence[] = { 0, 1, 2, 3 };</div><div class="line"><a name="l02501"></a><span class="lineno"> 2501</span>&#160;</div><div class="line"><a name="l02502"></a><span class="lineno"> 2502</span>&#160;    <span class="keywordflow">if</span> (squeezeDims.empty())</div><div class="line"><a name="l02503"></a><span class="lineno"> 2503</span>&#160;    {</div><div class="line"><a name="l02504"></a><span class="lineno"> 2504</span>&#160;        squeezeDims.assign(dimensionSequence,</div><div class="line"><a name="l02505"></a><span class="lineno"> 2505</span>&#160;                           dimensionSequence+inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>());</div><div class="line"><a name="l02506"></a><span class="lineno"> 2506</span>&#160;    }</div><div class="line"><a name="l02507"></a><span class="lineno"> 2507</span>&#160;</div><div class="line"><a name="l02508"></a><span class="lineno"> 2508</span>&#160;    std::vector&lt;uint32_t&gt; outputDims;</div><div class="line"><a name="l02509"></a><span class="lineno"> 2509</span>&#160;    <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i &lt; inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>(); i++)</div><div class="line"><a name="l02510"></a><span class="lineno"> 2510</span>&#160;    {</div><div class="line"><a name="l02511"></a><span class="lineno"> 2511</span>&#160;        <span class="keywordtype">bool</span> skipSqueeze = (std::find(squeezeDims.begin(), squeezeDims.end(), i) == squeezeDims.end());</div><div class="line"><a name="l02512"></a><span class="lineno"> 2512</span>&#160;        <span class="keyword">auto</span> currentDimension = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l02513"></a><span class="lineno"> 2513</span>&#160;        <span class="keywordflow">if</span> (skipSqueeze || currentDimension != 1)</div><div class="line"><a name="l02514"></a><span class="lineno"> 2514</span>&#160;        {</div><div class="line"><a name="l02515"></a><span class="lineno"> 2515</span>&#160;            outputDims.push_back(currentDimension);</div><div class="line"><a name="l02516"></a><span class="lineno"> 2516</span>&#160;        }</div><div class="line"><a name="l02517"></a><span class="lineno"> 2517</span>&#160;    }</div><div class="line"><a name="l02518"></a><span class="lineno"> 2518</span>&#160;</div><div class="line"><a name="l02519"></a><span class="lineno"> 2519</span>&#160;    <span class="keywordflow">if</span> (outputDims.size() &gt; 4)</div><div class="line"><a name="l02520"></a><span class="lineno"> 2520</span>&#160;    {</div><div class="line"><a name="l02521"></a><span class="lineno"> 2521</span>&#160;        <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l02522"></a><span class="lineno"> 2522</span>&#160;            boost::str(</div><div class="line"><a name="l02523"></a><span class="lineno"> 2523</span>&#160;                boost::format(</div><div class="line"><a name="l02524"></a><span class="lineno"> 2524</span>&#160;                    <span class="stringliteral">&quot;Unsupported number of dimensions: %1% for output shape for Squeeze %2% %3%&quot;</span>)</div><div class="line"><a name="l02525"></a><span class="lineno"> 2525</span>&#160;                    % outputDims.size()</div><div class="line"><a name="l02526"></a><span class="lineno"> 2526</span>&#160;                    % nodeDef.name()</div><div class="line"><a name="l02527"></a><span class="lineno"> 2527</span>&#160;                    % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02528"></a><span class="lineno"> 2528</span>&#160;    }</div><div class="line"><a name="l02529"></a><span class="lineno"> 2529</span>&#160;</div><div class="line"><a name="l02530"></a><span class="lineno"> 2530</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a> outShape = <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>(static_cast&lt;unsigned int&gt;(outputDims.size()),</div><div class="line"><a name="l02531"></a><span class="lineno"> 2531</span>&#160;                                       outputDims.data());</div><div class="line"><a name="l02532"></a><span class="lineno"> 2532</span>&#160;</div><div class="line"><a name="l02533"></a><span class="lineno"> 2533</span>&#160;    <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> outTensorInfo = inputTensorInfo;</div><div class="line"><a name="l02534"></a><span class="lineno"> 2534</span>&#160;    outTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(outShape);</div><div class="line"><a name="l02535"></a><span class="lineno"> 2535</span>&#160;    outTensorInfo.SetDataType(type);</div><div class="line"><a name="l02536"></a><span class="lineno"> 2536</span>&#160;</div><div class="line"><a name="l02537"></a><span class="lineno"> 2537</span>&#160;    <span class="keywordflow">return</span> outTensorInfo;</div><div class="line"><a name="l02538"></a><span class="lineno"> 2538</span>&#160;}</div><div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape &amp; GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div>
556 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div>
557 <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div>
558 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &amp;newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00090">Tensor.hpp:90</a></div></div>
559 <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">armnn::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00032">Types.hpp:32</a></div></div>
560 <div class="ttc" id="_exceptions_8hpp_xhtml_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00192">Exceptions.hpp:192</a></div></div>
561 <div class="ttc" id="classarmnn_1_1_parse_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_parse_exception.xhtml">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00092">Exceptions.hpp:92</a></div></div>
562 <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div>
563 </div><!-- fragment -->
564 </div>
565 </div>
566 </div><!-- contents -->
567 </div><!-- doc-content -->
568 <!-- start footer part -->
569 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
570   <ul>
571     <li class="navelem"><a class="el" href="namespacearmnn_tf_parser.xhtml">armnnTfParser</a></li>
572     <li class="footer">Generated on Fri Mar 13 2020 16:09:21 for ArmNN by
573     <a href="http://www.doxygen.org/index.html">
574     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
575   </ul>
576 </div>
577 </body>
578 </html>