Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 3 | <head> |
| 4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| 6 | <meta name="generator" content="Doxygen 1.8.13"/> |
| 7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> |
| 8 | <title>ArmNN: armnnTfParser Namespace Reference</title> |
| 9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 10 | <script type="text/javascript" src="jquery.js"></script> |
| 11 | <script type="text/javascript" src="dynsections.js"></script> |
| 12 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 13 | <script type="text/javascript" src="resize.js"></script> |
| 14 | <script type="text/javascript" src="navtreedata.js"></script> |
| 15 | <script type="text/javascript" src="navtree.js"></script> |
| 16 | <script type="text/javascript"> |
| 17 | $(document).ready(initResizable); |
| 18 | </script> |
| 19 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| 20 | <script type="text/javascript" src="search/searchdata.js"></script> |
| 21 | <script type="text/javascript" src="search/search.js"></script> |
| 22 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 23 | </head> |
| 24 | <body> |
| 25 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 26 | <div id="titlearea"> |
| 27 | <table cellspacing="0" cellpadding="0"> |
| 28 | <tbody> |
| 29 | <tr style="height: 56px;"> |
| 30 | <td id="projectalign" style="padding-left: 0.5em;"> |
| 31 | <div id="projectname">ArmNN |
| 32 |  <span id="projectnumber">NotReleased</span> |
| 33 | </div> |
| 34 | </td> |
| 35 | </tr> |
| 36 | </tbody> |
| 37 | </table> |
| 38 | </div> |
| 39 | <!-- end header part --> |
| 40 | <!-- Generated by Doxygen 1.8.13 --> |
| 41 | <script type="text/javascript"> |
| 42 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 43 | </script> |
| 44 | <script type="text/javascript" src="menudata.js"></script> |
| 45 | <script type="text/javascript" src="menu.js"></script> |
| 46 | <script type="text/javascript"> |
| 47 | $(function() { |
| 48 | initMenu('',true,false,'search.php','Search'); |
| 49 | $(document).ready(function() { init_search(); }); |
| 50 | }); |
| 51 | </script> |
| 52 | <div id="main-nav"></div> |
| 53 | </div><!-- top --> |
| 54 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 55 | <div id="nav-tree"> |
| 56 | <div id="nav-tree-contents"> |
| 57 | <div id="nav-sync" class="sync"></div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div id="splitbar" style="-moz-user-select:none;" |
| 61 | class="ui-resizable-handle"> |
| 62 | </div> |
| 63 | </div> |
| 64 | <script type="text/javascript"> |
| 65 | $(document).ready(function(){initNavTree('namespacearmnn_tf_parser.html','');}); |
| 66 | </script> |
| 67 | <div id="doc-content"> |
| 68 | <!-- window showing the filter options --> |
| 69 | <div id="MSearchSelectWindow" |
| 70 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 71 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 72 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| 73 | </div> |
| 74 | |
| 75 | <!-- iframe showing the search results (closed by default) --> |
| 76 | <div id="MSearchResultsWindow"> |
| 77 | <iframe src="javascript:void(0)" frameborder="0" |
| 78 | name="MSearchResults" id="MSearchResults"> |
| 79 | </iframe> |
| 80 | </div> |
| 81 | |
| 82 | <div class="header"> |
| 83 | <div class="summary"> |
| 84 | <a href="#nested-classes">Classes</a> | |
| 85 | <a href="#typedef-members">Typedefs</a> | |
| 86 | <a href="#func-members">Functions</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">armnnTfParser Namespace Reference</div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | <table class="memberdecls"> |
| 92 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a> |
| 93 | Classes</h2></td></tr> |
| 94 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.html">ITfParser</a></td></tr> |
| 95 | <tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Parses a directed acyclic graph from a tensorflow protobuf file. <a href="classarmnn_tf_parser_1_1_i_tf_parser.html#details">More...</a><br /></td></tr> |
| 96 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 97 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class  </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_tf_parser_1_1_tf_parser.html">TfParser</a></td></tr> |
| 98 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 99 | <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a></td></tr> |
| 100 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 101 | </table><table class="memberdecls"> |
| 102 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a> |
| 103 | Typedefs</h2></td></tr> |
| 104 | <tr class="memitem:a9084adbf804022c874039ad40d1939e9"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a9084adbf804022c874039ad40d1939e9">BindingPointInfo</a> = <a class="el" href="namespacearmnn.html#a280670a263dc4fd40491f6d0a2737f44">armnn::BindingPointInfo</a></td></tr> |
| 105 | <tr class="separator:a9084adbf804022c874039ad40d1939e9"><td class="memSeparator" colspan="2"> </td></tr> |
| 106 | <tr class="memitem:af7cec8b9a69e02f18a5de38502675d94"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#af7cec8b9a69e02f18a5de38502675d94">ITfParserPtr</a> = std::unique_ptr< <a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.html">ITfParser</a>, void(*)(<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.html">ITfParser</a> *parser)></td></tr> |
| 107 | <tr class="separator:af7cec8b9a69e02f18a5de38502675d94"><td class="memSeparator" colspan="2"> </td></tr> |
| 108 | <tr class="memitem:aa36bf288c19fe35767bb6e059636f405"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#aa36bf288c19fe35767bb6e059636f405">ParsedTfOperationPtr</a> = std::unique_ptr< ParsedTfOperation ></td></tr> |
| 109 | <tr class="separator:aa36bf288c19fe35767bb6e059636f405"><td class="memSeparator" colspan="2"> </td></tr> |
| 110 | <tr class="memitem:ad85fe4a9bf2aff90c53bc2f50c8931e6"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#ad85fe4a9bf2aff90c53bc2f50c8931e6">OutputOfParsedTfOperation</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a>< ParsedTfOperation * ></td></tr> |
| 111 | <tr class="separator:ad85fe4a9bf2aff90c53bc2f50c8931e6"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | <tr class="memitem:a4c8735480b01dbd0f75c63377fe054e9"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a4c8735480b01dbd0f75c63377fe054e9">OutputOfConstNodeDef</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a>< const tensorflow::NodeDef * ></td></tr> |
| 113 | <tr class="separator:a4c8735480b01dbd0f75c63377fe054e9"><td class="memSeparator" colspan="2"> </td></tr> |
| 114 | <tr class="memitem:abcf8e5fd95ba7e7bd8cd36fc24974223"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#abcf8e5fd95ba7e7bd8cd36fc24974223">OutputId</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a>< std::string ></td></tr> |
| 115 | <tr class="separator:abcf8e5fd95ba7e7bd8cd36fc24974223"><td class="memSeparator" colspan="2"> </td></tr> |
| 116 | </table><table class="memberdecls"> |
| 117 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 118 | Functions</h2></td></tr> |
| 119 | <tr class="memitem:a0540bb475d62bab024eebe8685181845"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a0540bb475d62bab024eebe8685181845">CalculateSamePadding</a> (uint32_t inputSize, uint32_t stride, uint32_t filterSize, bool samePadding, uint32_t *paddingFront, uint32_t *paddingBack)</td></tr> |
| 120 | <tr class="separator:a0540bb475d62bab024eebe8685181845"><td class="memSeparator" colspan="2"> </td></tr> |
| 121 | <tr class="memitem:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#aa78bf8d20e213dcd13d48072dfa9cd1f">CalcPadding</a> (uint32_t input, uint32_t kernel, uint32_t stride, uint32_t &outPadHead, uint32_t &outPadTail, bool samePadding)</td></tr> |
| 122 | <tr class="separator:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memSeparator" colspan="2"> </td></tr> |
| 123 | <tr class="memitem:a3d934e14ca544ba7af4fe562def8a986"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a3d934e14ca544ba7af4fe562def8a986">ConvertTfTensorDataType</a> (const tensorflow::DataType tfDataType, const tensorflow::NodeDef &nodeDef)</td></tr> |
| 124 | <tr class="separator:a3d934e14ca544ba7af4fe562def8a986"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <tr class="memitem:a22ac203831113ee3e429746f6055aa73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a22ac203831113ee3e429746f6055aa73">OutputShapeOfExpandDims</a> (const tensorflow::NodeDef &nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> inputTensorInfo)</td></tr> |
| 126 | <tr class="separator:a22ac203831113ee3e429746f6055aa73"><td class="memSeparator" colspan="2"> </td></tr> |
| 127 | <tr class="memitem:ae5488f1478c62281c5e937e79ebcd145"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#ae5488f1478c62281c5e937e79ebcd145">CheckPaddingTensor</a> (const <a class="el" href="classarmnn_1_1_const_tensor.html">ConstTensor</a> &paddingTensor, const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &inputTensorInfo, const std::string &nodeName)</td></tr> |
| 128 | <tr class="separator:ae5488f1478c62281c5e937e79ebcd145"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <tr class="memitem:a9c18860db8b032de579c5ad94cbae5d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a9c18860db8b032de579c5ad94cbae5d0">CalculatePaddedOutputTensorInfo</a> (const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> &inputTensorInfo, const std::vector< std::pair< unsigned int, unsigned int >> &padList)</td></tr> |
| 130 | <tr class="separator:a9c18860db8b032de579c5ad94cbae5d0"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <tr class="memitem:a6e06adf62d53562032e738b89f3eb37c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.html#a6e06adf62d53562032e738b89f3eb37c">OutputShapeOfSqueeze</a> (const tensorflow::NodeDef &nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> inputTensorInfo)</td></tr> |
| 132 | <tr class="separator:a6e06adf62d53562032e738b89f3eb37c"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | </table> |
| 134 | <h2 class="groupheader">Typedef Documentation</h2> |
| 135 | <a id="a9084adbf804022c874039ad40d1939e9"></a> |
| 136 | <h2 class="memtitle"><span class="permalink"><a href="#a9084adbf804022c874039ad40d1939e9">◆ </a></span>BindingPointInfo</h2> |
| 137 | |
| 138 | <div class="memitem"> |
| 139 | <div class="memproto"> |
| 140 | <table class="memname"> |
| 141 | <tr> |
| 142 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#a9084adbf804022c874039ad40d1939e9">BindingPointInfo</a> = <a class="el" href="namespacearmnn.html#a280670a263dc4fd40491f6d0a2737f44">armnn::BindingPointInfo</a></td> |
| 143 | </tr> |
| 144 | </table> |
| 145 | </div><div class="memdoc"> |
| 146 | |
| 147 | <p class="definition">Definition at line <a class="el" href="_i_tf_parser_8hpp_source.html#l00019">19</a> of file <a class="el" href="_i_tf_parser_8hpp_source.html">ITfParser.hpp</a>.</p> |
| 148 | |
| 149 | </div> |
| 150 | </div> |
| 151 | <a id="af7cec8b9a69e02f18a5de38502675d94"></a> |
| 152 | <h2 class="memtitle"><span class="permalink"><a href="#af7cec8b9a69e02f18a5de38502675d94">◆ </a></span>ITfParserPtr</h2> |
| 153 | |
| 154 | <div class="memitem"> |
| 155 | <div class="memproto"> |
| 156 | <table class="memname"> |
| 157 | <tr> |
| 158 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#af7cec8b9a69e02f18a5de38502675d94">ITfParserPtr</a> = std::unique_ptr<<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.html">ITfParser</a>, void(*)(<a class="el" href="classarmnn_tf_parser_1_1_i_tf_parser.html">ITfParser</a>* parser)></td> |
| 159 | </tr> |
| 160 | </table> |
| 161 | </div><div class="memdoc"> |
| 162 | |
| 163 | <p class="definition">Definition at line <a class="el" href="_i_tf_parser_8hpp_source.html#l00022">22</a> of file <a class="el" href="_i_tf_parser_8hpp_source.html">ITfParser.hpp</a>.</p> |
| 164 | |
| 165 | </div> |
| 166 | </div> |
| 167 | <a id="abcf8e5fd95ba7e7bd8cd36fc24974223"></a> |
| 168 | <h2 class="memtitle"><span class="permalink"><a href="#abcf8e5fd95ba7e7bd8cd36fc24974223">◆ </a></span>OutputId</h2> |
| 169 | |
| 170 | <div class="memitem"> |
| 171 | <div class="memproto"> |
| 172 | <table class="memname"> |
| 173 | <tr> |
| 174 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#abcf8e5fd95ba7e7bd8cd36fc24974223">OutputId</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a><std::string></td> |
| 175 | </tr> |
| 176 | </table> |
| 177 | </div><div class="memdoc"> |
| 178 | |
| 179 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.html#l00062">62</a> of file <a class="el" href="_tf_parser_8hpp_source.html">TfParser.hpp</a>.</p> |
| 180 | |
| 181 | </div> |
| 182 | </div> |
| 183 | <a id="a4c8735480b01dbd0f75c63377fe054e9"></a> |
| 184 | <h2 class="memtitle"><span class="permalink"><a href="#a4c8735480b01dbd0f75c63377fe054e9">◆ </a></span>OutputOfConstNodeDef</h2> |
| 185 | |
| 186 | <div class="memitem"> |
| 187 | <div class="memproto"> |
| 188 | <table class="memname"> |
| 189 | <tr> |
| 190 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#a4c8735480b01dbd0f75c63377fe054e9">OutputOfConstNodeDef</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a><const tensorflow::NodeDef*></td> |
| 191 | </tr> |
| 192 | </table> |
| 193 | </div><div class="memdoc"> |
| 194 | |
| 195 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.html#l00061">61</a> of file <a class="el" href="_tf_parser_8hpp_source.html">TfParser.hpp</a>.</p> |
| 196 | |
| 197 | </div> |
| 198 | </div> |
| 199 | <a id="ad85fe4a9bf2aff90c53bc2f50c8931e6"></a> |
| 200 | <h2 class="memtitle"><span class="permalink"><a href="#ad85fe4a9bf2aff90c53bc2f50c8931e6">◆ </a></span>OutputOfParsedTfOperation</h2> |
| 201 | |
| 202 | <div class="memitem"> |
| 203 | <div class="memproto"> |
| 204 | <table class="memname"> |
| 205 | <tr> |
| 206 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#ad85fe4a9bf2aff90c53bc2f50c8931e6">OutputOfParsedTfOperation</a> = <a class="el" href="structarmnn_tf_parser_1_1_with_output_tensor_index.html">WithOutputTensorIndex</a><ParsedTfOperation *></td> |
| 207 | </tr> |
| 208 | </table> |
| 209 | </div><div class="memdoc"> |
| 210 | |
| 211 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.html#l00060">60</a> of file <a class="el" href="_tf_parser_8hpp_source.html">TfParser.hpp</a>.</p> |
| 212 | |
| 213 | </div> |
| 214 | </div> |
| 215 | <a id="aa36bf288c19fe35767bb6e059636f405"></a> |
| 216 | <h2 class="memtitle"><span class="permalink"><a href="#aa36bf288c19fe35767bb6e059636f405">◆ </a></span>ParsedTfOperationPtr</h2> |
| 217 | |
| 218 | <div class="memitem"> |
| 219 | <div class="memproto"> |
| 220 | <table class="memname"> |
| 221 | <tr> |
| 222 | <td class="memname">using <a class="el" href="namespacearmnn_tf_parser.html#aa36bf288c19fe35767bb6e059636f405">ParsedTfOperationPtr</a> = std::unique_ptr<ParsedTfOperation></td> |
| 223 | </tr> |
| 224 | </table> |
| 225 | </div><div class="memdoc"> |
| 226 | |
| 227 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8hpp_source.html#l00035">35</a> of file <a class="el" href="_tf_parser_8hpp_source.html">TfParser.hpp</a>.</p> |
| 228 | |
| 229 | </div> |
| 230 | </div> |
| 231 | <h2 class="groupheader">Function Documentation</h2> |
| 232 | <a id="aa78bf8d20e213dcd13d48072dfa9cd1f"></a> |
| 233 | <h2 class="memtitle"><span class="permalink"><a href="#aa78bf8d20e213dcd13d48072dfa9cd1f">◆ </a></span>CalcPadding()</h2> |
| 234 | |
| 235 | <div class="memitem"> |
| 236 | <div class="memproto"> |
| 237 | <table class="memname"> |
| 238 | <tr> |
| 239 | <td class="memname">void armnnTfParser::CalcPadding </td> |
| 240 | <td>(</td> |
| 241 | <td class="paramtype">uint32_t </td> |
| 242 | <td class="paramname"><em>input</em>, </td> |
| 243 | </tr> |
| 244 | <tr> |
| 245 | <td class="paramkey"></td> |
| 246 | <td></td> |
| 247 | <td class="paramtype">uint32_t </td> |
| 248 | <td class="paramname"><em>kernel</em>, </td> |
| 249 | </tr> |
| 250 | <tr> |
| 251 | <td class="paramkey"></td> |
| 252 | <td></td> |
| 253 | <td class="paramtype">uint32_t </td> |
| 254 | <td class="paramname"><em>stride</em>, </td> |
| 255 | </tr> |
| 256 | <tr> |
| 257 | <td class="paramkey"></td> |
| 258 | <td></td> |
| 259 | <td class="paramtype">uint32_t & </td> |
| 260 | <td class="paramname"><em>outPadHead</em>, </td> |
| 261 | </tr> |
| 262 | <tr> |
| 263 | <td class="paramkey"></td> |
| 264 | <td></td> |
| 265 | <td class="paramtype">uint32_t & </td> |
| 266 | <td class="paramname"><em>outPadTail</em>, </td> |
| 267 | </tr> |
| 268 | <tr> |
| 269 | <td class="paramkey"></td> |
| 270 | <td></td> |
| 271 | <td class="paramtype">bool </td> |
| 272 | <td class="paramname"><em>samePadding</em> </td> |
| 273 | </tr> |
| 274 | <tr> |
| 275 | <td></td> |
| 276 | <td>)</td> |
| 277 | <td></td><td></td> |
| 278 | </tr> |
| 279 | </table> |
| 280 | </div><div class="memdoc"> |
| 281 | |
| 282 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l00419">419</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 283 | |
| 284 | <p class="reference">References <a class="el" href="_tf_parser_8cpp_source.html#l00403">CalculateSamePadding()</a>, <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="_layer_8hpp_source.html#l00305">Layer::GetName()</a>, <a class="el" href="_layer_8hpp_source.html#l00308">Layer::GetNumOutputSlots()</a>, <a class="el" href="_layer_8hpp_source.html#l00312">Layer::GetOutputSlot()</a>, and <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00239">m_Layer</a>.</p> |
| 285 | |
| 286 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.html#l00931">ConvertTfTensorDataType()</a>, <a class="el" href="_tf_lite_parser_8cpp_source.html#l00597">TfLiteParser::CreateNetworkFromBinary()</a>, <a class="el" href="_onnx_parser_8cpp_source.html#l00584">OnnxParser::CreateNetworkFromString()</a>, and <a class="el" href="_tf_parser_8cpp_source.html#l02414">OutputShapeOfSqueeze()</a>.</p> |
| 287 | <div class="fragment"><div class="line"><a name="l00421"></a><span class="lineno"> 421</span> {</div><div class="line"><a name="l00422"></a><span class="lineno"> 422</span>  <a class="code" href="namespacearmnn_tf_parser.html#a0540bb475d62bab024eebe8685181845">CalculateSamePadding</a>(input, stride, kernel, samePadding, &outPadHead, &outPadTail);</div><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> }</div><div class="ttc" id="namespacearmnn_tf_parser_html_a0540bb475d62bab024eebe8685181845"><div class="ttname"><a href="namespacearmnn_tf_parser.html#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.html#l00403">TfParser.cpp:403</a></div></div> |
| 288 | </div><!-- fragment --> |
| 289 | </div> |
| 290 | </div> |
| 291 | <a id="a9c18860db8b032de579c5ad94cbae5d0"></a> |
| 292 | <h2 class="memtitle"><span class="permalink"><a href="#a9c18860db8b032de579c5ad94cbae5d0">◆ </a></span>CalculatePaddedOutputTensorInfo()</h2> |
| 293 | |
| 294 | <div class="memitem"> |
| 295 | <div class="memproto"> |
| 296 | <table class="memname"> |
| 297 | <tr> |
| 298 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> armnnTfParser::CalculatePaddedOutputTensorInfo </td> |
| 299 | <td>(</td> |
| 300 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 301 | <td class="paramname"><em>inputTensorInfo</em>, </td> |
| 302 | </tr> |
| 303 | <tr> |
| 304 | <td class="paramkey"></td> |
| 305 | <td></td> |
| 306 | <td class="paramtype">const std::vector< std::pair< unsigned int, unsigned int >> & </td> |
| 307 | <td class="paramname"><em>padList</em> </td> |
| 308 | </tr> |
| 309 | <tr> |
| 310 | <td></td> |
| 311 | <td>)</td> |
| 312 | <td></td><td></td> |
| 313 | </tr> |
| 314 | </table> |
| 315 | </div><div class="memdoc"> |
| 316 | |
| 317 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l02089">2089</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 318 | |
| 319 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.html#aef27f787e8a2ee19c4052261f963f28e">INetwork::AddConcatLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a07485f1477554d32e43edc39502ac419">INetwork::AddPadLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a617aeb663e1535568864c23f5d988dd8">INetwork::AddResizeLayer()</a>, <a class="el" href="namespacearmnn.html#a9a2af2f8c4af4f9efa8e79417d505ac4aaf17c98bbd83c27d6426d2ff3fa81d7f">armnn::Bilinear</a>, <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.html#l02057">CheckPaddingTensor()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00088">TensorInfo::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_descriptors_8cpp_source.html#l00189">OriginsDescriptor::GetViewOrigin()</a>, <a class="el" href="_descriptors_8hpp_source.html#l00751">ResizeDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l00749">ResizeDescriptor::m_Method</a>, <a class="el" href="_descriptors_8hpp_source.html#l00746">ResizeDescriptor::m_TargetHeight</a>, <a class="el" href="_descriptors_8hpp_source.html#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="_descriptors_8hpp_source.html#l00744">ResizeDescriptor::m_TargetWidth</a>, <a class="el" href="namespacearmnn.html#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>, <a class="el" href="_descriptors_8cpp_source.html#l00150">OriginsDescriptor::SetConcatAxis()</a>, <a class="el" href="_tensor_8hpp_source.html#l00090">TensorInfo::SetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, and <a class="el" href="_descriptors_8cpp_source.html#l00159">OriginsDescriptor::SetViewOriginCoord()</a>.</p> |
| 320 | <div class="fragment"><div class="line"><a name="l02091"></a><span class="lineno"> 2091</span> {</div><div class="line"><a name="l02092"></a><span class="lineno"> 2092</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numDims = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>();</div><div class="line"><a name="l02093"></a><span class="lineno"> 2093</span>  std::vector<unsigned int> outDims;</div><div class="line"><a name="l02094"></a><span class="lineno"> 2094</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < numDims; ++i)</div><div class="line"><a name="l02095"></a><span class="lineno"> 2095</span>  {</div><div class="line"><a name="l02096"></a><span class="lineno"> 2096</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dimSize = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l02097"></a><span class="lineno"> 2097</span>  <span class="keyword">const</span> std::pair<unsigned int, unsigned int>& dimPadding = padList[i];</div><div class="line"><a name="l02098"></a><span class="lineno"> 2098</span>  dimSize += dimPadding.first;</div><div class="line"><a name="l02099"></a><span class="lineno"> 2099</span>  dimSize += dimPadding.second;</div><div class="line"><a name="l02100"></a><span class="lineno"> 2100</span>  outDims.push_back(dimSize);</div><div class="line"><a name="l02101"></a><span class="lineno"> 2101</span>  }</div><div class="line"><a name="l02102"></a><span class="lineno"> 2102</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> paddedTensorInfo = inputTensorInfo;</div><div class="line"><a name="l02103"></a><span class="lineno"> 2103</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outDimsSize = <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outDims.size());</div><div class="line"><a name="l02104"></a><span class="lineno"> 2104</span>  paddedTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(<a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>{ outDimsSize, outDims.data() });</div><div class="line"><a name="l02105"></a><span class="lineno"> 2105</span>  <span class="keywordflow">return</span> paddedTensorInfo;</div><div class="line"><a name="l02106"></a><span class="lineno"> 2106</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#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.html#l00092">Tensor.hpp:92</a></div></div> |
| 321 | <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div> |
| 322 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00090">Tensor.hpp:90</a></div></div> |
| 323 | <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div> |
| 324 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00088">Tensor.hpp:88</a></div></div> |
| 325 | </div><!-- fragment --> |
| 326 | </div> |
| 327 | </div> |
| 328 | <a id="a0540bb475d62bab024eebe8685181845"></a> |
| 329 | <h2 class="memtitle"><span class="permalink"><a href="#a0540bb475d62bab024eebe8685181845">◆ </a></span>CalculateSamePadding()</h2> |
| 330 | |
| 331 | <div class="memitem"> |
| 332 | <div class="memproto"> |
| 333 | <table class="mlabels"> |
| 334 | <tr> |
| 335 | <td class="mlabels-left"> |
| 336 | <table class="memname"> |
| 337 | <tr> |
| 338 | <td class="memname">void armnnTfParser::CalculateSamePadding </td> |
| 339 | <td>(</td> |
| 340 | <td class="paramtype">uint32_t </td> |
| 341 | <td class="paramname"><em>inputSize</em>, </td> |
| 342 | </tr> |
| 343 | <tr> |
| 344 | <td class="paramkey"></td> |
| 345 | <td></td> |
| 346 | <td class="paramtype">uint32_t </td> |
| 347 | <td class="paramname"><em>stride</em>, </td> |
| 348 | </tr> |
| 349 | <tr> |
| 350 | <td class="paramkey"></td> |
| 351 | <td></td> |
| 352 | <td class="paramtype">uint32_t </td> |
| 353 | <td class="paramname"><em>filterSize</em>, </td> |
| 354 | </tr> |
| 355 | <tr> |
| 356 | <td class="paramkey"></td> |
| 357 | <td></td> |
| 358 | <td class="paramtype">bool </td> |
| 359 | <td class="paramname"><em>samePadding</em>, </td> |
| 360 | </tr> |
| 361 | <tr> |
| 362 | <td class="paramkey"></td> |
| 363 | <td></td> |
| 364 | <td class="paramtype">uint32_t * </td> |
| 365 | <td class="paramname"><em>paddingFront</em>, </td> |
| 366 | </tr> |
| 367 | <tr> |
| 368 | <td class="paramkey"></td> |
| 369 | <td></td> |
| 370 | <td class="paramtype">uint32_t * </td> |
| 371 | <td class="paramname"><em>paddingBack</em> </td> |
| 372 | </tr> |
| 373 | <tr> |
| 374 | <td></td> |
| 375 | <td>)</td> |
| 376 | <td></td><td></td> |
| 377 | </tr> |
| 378 | </table> |
| 379 | </td> |
| 380 | <td class="mlabels-right"> |
| 381 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 382 | </tr> |
| 383 | </table> |
| 384 | </div><div class="memdoc"> |
| 385 | |
| 386 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l00403">403</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 387 | |
| 388 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.html#l00419">CalcPadding()</a>.</p> |
| 389 | <div class="fragment"><div class="line"><a name="l00405"></a><span class="lineno"> 405</span>  {</div><div class="line"><a name="l00406"></a><span class="lineno"> 406</span>  *paddingFront = 0;</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  *paddingBack = 0;</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span> </div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="keywordflow">if</span> (samePadding) {</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  uint32_t outputSize = (inputSize + stride - 1) / stride;</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  uint32_t temp = (outputSize - 1) * stride + filterSize;</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  <span class="keywordflow">if</span> (temp > inputSize) {</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span>  *paddingFront = (temp - inputSize) / 2;</div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  *paddingBack = (temp - inputSize) - *paddingFront;</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  }</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  }</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> }</div></div><!-- fragment --> |
| 390 | </div> |
| 391 | </div> |
| 392 | <a id="ae5488f1478c62281c5e937e79ebcd145"></a> |
| 393 | <h2 class="memtitle"><span class="permalink"><a href="#ae5488f1478c62281c5e937e79ebcd145">◆ </a></span>CheckPaddingTensor()</h2> |
| 394 | |
| 395 | <div class="memitem"> |
| 396 | <div class="memproto"> |
| 397 | <table class="memname"> |
| 398 | <tr> |
| 399 | <td class="memname">unsigned int armnnTfParser::CheckPaddingTensor </td> |
| 400 | <td>(</td> |
| 401 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_const_tensor.html">ConstTensor</a> & </td> |
| 402 | <td class="paramname"><em>paddingTensor</em>, </td> |
| 403 | </tr> |
| 404 | <tr> |
| 405 | <td class="paramkey"></td> |
| 406 | <td></td> |
| 407 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> & </td> |
| 408 | <td class="paramname"><em>inputTensorInfo</em>, </td> |
| 409 | </tr> |
| 410 | <tr> |
| 411 | <td class="paramkey"></td> |
| 412 | <td></td> |
| 413 | <td class="paramtype">const std::string & </td> |
| 414 | <td class="paramname"><em>nodeName</em> </td> |
| 415 | </tr> |
| 416 | <tr> |
| 417 | <td></td> |
| 418 | <td>)</td> |
| 419 | <td></td><td></td> |
| 420 | </tr> |
| 421 | </table> |
| 422 | </div><div class="memdoc"> |
| 423 | |
| 424 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l02057">2057</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 425 | |
| 426 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="_tensor_8hpp_source.html#l00092">TensorInfo::GetNumDimensions()</a>, and <a class="el" href="_tensor_8hpp_source.html#l00169">BaseTensor< MemoryType >::GetShape()</a>.</p> |
| 427 | |
| 428 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.html#l02089">CalculatePaddedOutputTensorInfo()</a>.</p> |
| 429 | <div class="fragment"><div class="line"><a name="l02060"></a><span class="lineno"> 2060</span> {</div><div class="line"><a name="l02061"></a><span class="lineno"> 2061</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> rank = paddingTensor.<a class="code" href="classarmnn_1_1_base_tensor.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[0];</div><div class="line"><a name="l02062"></a><span class="lineno"> 2062</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> expectedRank = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>();</div><div class="line"><a name="l02063"></a><span class="lineno"> 2063</span>  <span class="keywordflow">if</span> (rank != expectedRank)</div><div class="line"><a name="l02064"></a><span class="lineno"> 2064</span>  {</div><div class="line"><a name="l02065"></a><span class="lineno"> 2065</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l02066"></a><span class="lineno"> 2066</span>  boost::str(</div><div class="line"><a name="l02067"></a><span class="lineno"> 2067</span>  boost::format(</div><div class="line"><a name="l02068"></a><span class="lineno"> 2068</span>  <span class="stringliteral">"Expected the padding tensor to be of rank %1 not %2 on Node %3 %4."</span>)</div><div class="line"><a name="l02069"></a><span class="lineno"> 2069</span>  % expectedRank</div><div class="line"><a name="l02070"></a><span class="lineno"> 2070</span>  % rank</div><div class="line"><a name="l02071"></a><span class="lineno"> 2071</span>  % nodeName</div><div class="line"><a name="l02072"></a><span class="lineno"> 2072</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02073"></a><span class="lineno"> 2073</span>  }</div><div class="line"><a name="l02074"></a><span class="lineno"> 2074</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> second = paddingTensor.<a class="code" href="classarmnn_1_1_base_tensor.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l02075"></a><span class="lineno"> 2075</span>  <span class="keywordflow">if</span> (second != 2)</div><div class="line"><a name="l02076"></a><span class="lineno"> 2076</span>  {</div><div class="line"><a name="l02077"></a><span class="lineno"> 2077</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l02078"></a><span class="lineno"> 2078</span>  boost::str(</div><div class="line"><a name="l02079"></a><span class="lineno"> 2079</span>  boost::format(</div><div class="line"><a name="l02080"></a><span class="lineno"> 2080</span>  <span class="stringliteral">"Expected the padding tensor to be of dimensions [%1, 2] not [%1, %2] on Node %3 %4."</span>)</div><div class="line"><a name="l02081"></a><span class="lineno"> 2081</span>  % rank</div><div class="line"><a name="l02082"></a><span class="lineno"> 2082</span>  % second</div><div class="line"><a name="l02083"></a><span class="lineno"> 2083</span>  % nodeName</div><div class="line"><a name="l02084"></a><span class="lineno"> 2084</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02085"></a><span class="lineno"> 2085</span>  }</div><div class="line"><a name="l02086"></a><span class="lineno"> 2086</span>  <span class="keywordflow">return</span> rank;</div><div class="line"><a name="l02087"></a><span class="lineno"> 2087</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#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.html#l00092">Tensor.hpp:92</a></div></div> |
| 430 | <div class="ttc" id="classarmnn_1_1_parse_exception_html"><div class="ttname"><a href="classarmnn_1_1_parse_exception.html">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00092">Exceptions.hpp:92</a></div></div> |
| 431 | <div class="ttc" id="classarmnn_1_1_base_tensor_html_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_base_tensor.html#a8b5d0f8a24e9d9238f412260a552acf8">armnn::BaseTensor::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00169">Tensor.hpp:169</a></div></div> |
| 432 | <div class="ttc" id="_exceptions_8hpp_html_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00169">Exceptions.hpp:169</a></div></div> |
| 433 | </div><!-- fragment --> |
| 434 | </div> |
| 435 | </div> |
| 436 | <a id="a3d934e14ca544ba7af4fe562def8a986"></a> |
| 437 | <h2 class="memtitle"><span class="permalink"><a href="#a3d934e14ca544ba7af4fe562def8a986">◆ </a></span>ConvertTfTensorDataType()</h2> |
| 438 | |
| 439 | <div class="memitem"> |
| 440 | <div class="memproto"> |
| 441 | <table class="memname"> |
| 442 | <tr> |
| 443 | <td class="memname"><a class="el" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> armnnTfParser::ConvertTfTensorDataType </td> |
| 444 | <td>(</td> |
| 445 | <td class="paramtype">const tensorflow::DataType </td> |
| 446 | <td class="paramname"><em>tfDataType</em>, </td> |
| 447 | </tr> |
| 448 | <tr> |
| 449 | <td class="paramkey"></td> |
| 450 | <td></td> |
| 451 | <td class="paramtype">const tensorflow::NodeDef & </td> |
| 452 | <td class="paramname"><em>nodeDef</em> </td> |
| 453 | </tr> |
| 454 | <tr> |
| 455 | <td></td> |
| 456 | <td>)</td> |
| 457 | <td></td><td></td> |
| 458 | </tr> |
| 459 | </table> |
| 460 | </div><div class="memdoc"> |
| 461 | |
| 462 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l00931">931</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 463 | |
| 464 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.html#a073e2f61f527d7d3801c26bdbd37dd7e">INetwork::AddConvolution2dLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a78367a5054c92d435f4f5c7e10ec65b8">INetwork::AddDepthwiseConvolution2dLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00419">CalcPadding()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00313">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00327">CHECK_PADDING_TYPE</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_types_utils_8hpp_source.html#l00113">armnn::GetDataTypeSize()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.html#l00024">DataLayoutIndexed::GetHeightIndex()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00093">TensorInfo::GetNumElements()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_8hpp_source.html#l00169">BaseTensor< MemoryType >::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.html#l00025">DataLayoutIndexed::GetWidthIndex()</a>, <a class="el" href="_descriptors_8hpp_source.html#l00438">Convolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.html#l00490">DepthwiseConvolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.html#l00440">Convolution2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l00492">DepthwiseConvolution2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l00428">Convolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.html#l00480">DepthwiseConvolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.html#l00422">Convolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.html#l00474">DepthwiseConvolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.html#l00424">Convolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.html#l00476">DepthwiseConvolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.html#l00426">Convolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.html#l00478">DepthwiseConvolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.html#l00430">Convolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.html#l00482">DepthwiseConvolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.html#l00432">Convolution2dDescriptor::m_StrideY</a>, <a class="el" href="_descriptors_8hpp_source.html#l00484">DepthwiseConvolution2dDescriptor::m_StrideY</a>, <a class="el" href="_permute_8cpp_source.html#l00121">armnnUtils::Permute()</a>, <a class="el" href="_permute_8cpp_source.html#l00098">armnnUtils::Permuted()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 465 | <div class="fragment"><div class="line"><a name="l00933"></a><span class="lineno"> 933</span> {</div><div class="line"><a name="l00934"></a><span class="lineno"> 934</span>  <span class="keywordflow">switch</span> (tfDataType)</div><div class="line"><a name="l00935"></a><span class="lineno"> 935</span>  {</div><div class="line"><a name="l00936"></a><span class="lineno"> 936</span>  <span class="keywordflow">case</span> tensorflow::DT_FLOAT:</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>  <span class="keywordflow">return</span> DataType::Float32;</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  <span class="keywordflow">case</span> tensorflow::DT_INT32:</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>  <span class="keywordflow">return</span> DataType::Signed32;</div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>  boost::str(</div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span>  boost::format(</div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  <span class="stringliteral">"Unknown DataType %1% for node %2% %3%"</span>)</div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  % tensorflow::DataType_Name(tfDataType)</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>  % nodeDef.name()</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  }</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span> }</div><div class="ttc" id="classarmnn_1_1_parse_exception_html"><div class="ttname"><a href="classarmnn_1_1_parse_exception.html">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00092">Exceptions.hpp:92</a></div></div> |
| 466 | <div class="ttc" id="_exceptions_8hpp_html_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00169">Exceptions.hpp:169</a></div></div> |
| 467 | </div><!-- fragment --> |
| 468 | </div> |
| 469 | </div> |
| 470 | <a id="a22ac203831113ee3e429746f6055aa73"></a> |
| 471 | <h2 class="memtitle"><span class="permalink"><a href="#a22ac203831113ee3e429746f6055aa73">◆ </a></span>OutputShapeOfExpandDims()</h2> |
| 472 | |
| 473 | <div class="memitem"> |
| 474 | <div class="memproto"> |
| 475 | <table class="memname"> |
| 476 | <tr> |
| 477 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> armnnTfParser::OutputShapeOfExpandDims </td> |
| 478 | <td>(</td> |
| 479 | <td class="paramtype">const tensorflow::NodeDef & </td> |
| 480 | <td class="paramname"><em>nodeDef</em>, </td> |
| 481 | </tr> |
| 482 | <tr> |
| 483 | <td class="paramkey"></td> |
| 484 | <td></td> |
| 485 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> </td> |
| 486 | <td class="paramname"><em>inputTensorInfo</em> </td> |
| 487 | </tr> |
| 488 | <tr> |
| 489 | <td></td> |
| 490 | <td>)</td> |
| 491 | <td></td><td></td> |
| 492 | </tr> |
| 493 | </table> |
| 494 | </div><div class="memdoc"> |
| 495 | |
| 496 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l01466">1466</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 497 | |
| 498 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.html#aea068f6094e1c3bfcdf8167b68112632">INetwork::AddActivationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a8d1067e754512c434da1238b67ad26ea">INetwork::AddBatchNormalizationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ac3be1bcc0fa5ffaf04a4f1d20d0ab7f4">INetwork::AddComparisonLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a8440d2a2afd3eb3526212081c9016830">INetwork::AddGatherLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a4cc12e3bd9ffe196cc8b351f25a104e3">INetwork::AddMinimumLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#afaa808f44f0b8332ec0bd54f4fea47c0">INetwork::AddStackLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ab6d332d9c4b4f04c23f40f04f7f56d0d">INetwork::AddSubtractionLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00313">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_tensor_8hpp_source.html#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00043">TensorShape::GetNumDimensions()</a>, <a class="el" href="_tensor_8hpp_source.html#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00088">TensorInfo::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.html#l00037">ActivationDescriptor::m_A</a>, <a class="el" href="_descriptors_8hpp_source.html#l00972">StackDescriptor::m_Axis</a>, <a class="el" href="_descriptors_8hpp_source.html#l00625">BatchNormalizationDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l00623">BatchNormalizationDescriptor::m_Eps</a>, <a class="el" href="_descriptors_8hpp_source.html#l00035">ActivationDescriptor::m_Function</a>, <a class="el" href="_tf_parser_8hpp_source.html#l00049">WithOutputTensorIndex< T >::m_Index</a>, <a class="el" href="_tf_parser_8hpp_source.html#l00048">WithOutputTensorIndex< T >::m_IndexedValue</a>, <a class="el" href="_descriptors_8hpp_source.html#l00976">StackDescriptor::m_InputShape</a>, <a class="el" href="_descriptors_8hpp_source.html#l00974">StackDescriptor::m_NumInputs</a>, <a class="el" href="_descriptors_8hpp_source.html#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="_tensor_8hpp_source.html#l00096">TensorInfo::SetDataType()</a>, <a class="el" href="_tensor_8hpp_source.html#l00090">TensorInfo::SetShape()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 499 | <div class="fragment"><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span> {</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>  BOOST_ASSERT(nodeDef.op() == <span class="stringliteral">"ExpandDims"</span>);</div><div class="line"><a name="l01469"></a><span class="lineno"> 1469</span> </div><div class="line"><a name="l01470"></a><span class="lineno"> 1470</span>  <span class="keywordflow">if</span> (inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>() > 4) {</div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>  boost::str(</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>  boost::format(</div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>  <span class="stringliteral">"Unsupported number of dimensions: %1% for input shape for ExpandDims %2% %3%"</span>)</div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span>  % inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>()</div><div class="line"><a name="l01476"></a><span class="lineno"> 1476</span>  % nodeDef.name()</div><div class="line"><a name="l01477"></a><span class="lineno"> 1477</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01478"></a><span class="lineno"> 1478</span>  }</div><div class="line"><a name="l01479"></a><span class="lineno"> 1479</span> </div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>  std::int32_t expandDim = ReadMandatoryNodeInt32Attribute(nodeDef, <span class="stringliteral">"Tdim"</span>);</div><div class="line"><a name="l01481"></a><span class="lineno"> 1481</span> </div><div class="line"><a name="l01482"></a><span class="lineno"> 1482</span>  std::int32_t inputDimSize = boost::numeric_cast<int32_t>(inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>());</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>  std::vector<uint32_t> outputDims;</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span> </div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>  <span class="comment">// expandDim operation requires: -1-input.dims() <= dim <= input.dims()</span></div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>  <span class="keywordflow">if</span> (expandDim >= -1 - inputDimSize && expandDim <= inputDimSize)</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>  {</div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>  <span class="comment">// add current input shape to outputDims</span></div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>(); ++i) {</div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>  <span class="keyword">auto</span> currentDimension = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>  outputDims.push_back(currentDimension);</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>  }</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span> </div><div class="line"><a name="l01494"></a><span class="lineno"> 1494</span>  <span class="comment">// insert a dimension of 1 at index 'expandDim' of inputs shape</span></div><div class="line"><a name="l01495"></a><span class="lineno"> 1495</span>  <span class="keywordflow">if</span> (expandDim >= 0)</div><div class="line"><a name="l01496"></a><span class="lineno"> 1496</span>  {</div><div class="line"><a name="l01497"></a><span class="lineno"> 1497</span>  <span class="keyword">auto</span> getPosition = std::next(outputDims.begin() + 0, expandDim);</div><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span>  outputDims.insert(getPosition, 1);</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>  }</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span> </div><div class="line"><a name="l01501"></a><span class="lineno"> 1501</span>  <span class="comment">// if negative number for 'expandDim' then count backwards from the last element</span></div><div class="line"><a name="l01502"></a><span class="lineno"> 1502</span>  <span class="comment">// and insert 1 dimension at index 'expandDim'</span></div><div class="line"><a name="l01503"></a><span class="lineno"> 1503</span>  <span class="keywordflow">if</span> (expandDim < 0)</div><div class="line"><a name="l01504"></a><span class="lineno"> 1504</span>  {</div><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span>  <span class="keywordtype">int</span> outputDimSize = boost::numeric_cast<<span class="keywordtype">int</span>>(outputDims.size() + 1);</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>  <span class="keyword">auto</span> getPosition = std::next(outputDims.begin() + outputDimSize, expandDim);</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span>  outputDims.insert(getPosition, 1);</div><div class="line"><a name="l01508"></a><span class="lineno"> 1508</span>  }</div><div class="line"><a name="l01509"></a><span class="lineno"> 1509</span>  }</div><div class="line"><a name="l01510"></a><span class="lineno"> 1510</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01511"></a><span class="lineno"> 1511</span>  {</div><div class="line"><a name="l01512"></a><span class="lineno"> 1512</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.html">InvalidArgumentException</a>(</div><div class="line"><a name="l01513"></a><span class="lineno"> 1513</span>  boost::str(</div><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span>  boost::format(</div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>  <span class="stringliteral">"Cannot expand dimension %1% in input tensor with %2% dimension %3%"</span>)</div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>  % expandDim</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>  % inputDimSize</div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>  }</div><div class="line"><a name="l01520"></a><span class="lineno"> 1520</span> </div><div class="line"><a name="l01521"></a><span class="lineno"> 1521</span>  <span class="keywordflow">if</span> (outputDims.size() > 4)</div><div class="line"><a name="l01522"></a><span class="lineno"> 1522</span>  {</div><div class="line"><a name="l01523"></a><span class="lineno"> 1523</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l01524"></a><span class="lineno"> 1524</span>  boost::str(</div><div class="line"><a name="l01525"></a><span class="lineno"> 1525</span>  boost::format(</div><div class="line"><a name="l01526"></a><span class="lineno"> 1526</span>  <span class="stringliteral">"Unsupported number of dimensions: %1% for output shape for ExpandDims %2% %3%"</span>)</div><div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>  % outputDims.size()</div><div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>  % nodeDef.name()</div><div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01530"></a><span class="lineno"> 1530</span>  }</div><div class="line"><a name="l01531"></a><span class="lineno"> 1531</span> </div><div class="line"><a name="l01532"></a><span class="lineno"> 1532</span>  <a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> outShape = <a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>(static_cast<unsigned int>(outputDims.size()),</div><div class="line"><a name="l01533"></a><span class="lineno"> 1533</span>  outputDims.data());</div><div class="line"><a name="l01534"></a><span class="lineno"> 1534</span> </div><div class="line"><a name="l01535"></a><span class="lineno"> 1535</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> outTensorInfo = inputTensorInfo;</div><div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>  outTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(outShape);</div><div class="line"><a name="l01537"></a><span class="lineno"> 1537</span> </div><div class="line"><a name="l01538"></a><span class="lineno"> 1538</span>  <span class="keywordflow">return</span> outTensorInfo;</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#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.html#l00092">Tensor.hpp:92</a></div></div> |
| 500 | <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div> |
| 501 | <div class="ttc" id="classarmnn_1_1_parse_exception_html"><div class="ttname"><a href="classarmnn_1_1_parse_exception.html">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00092">Exceptions.hpp:92</a></div></div> |
| 502 | <div class="ttc" id="_exceptions_8hpp_html_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00169">Exceptions.hpp:169</a></div></div> |
| 503 | <div class="ttc" id="classarmnn_1_1_invalid_argument_exception_html"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.html">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00080">Exceptions.hpp:80</a></div></div> |
| 504 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00090">Tensor.hpp:90</a></div></div> |
| 505 | <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div> |
| 506 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00088">Tensor.hpp:88</a></div></div> |
| 507 | </div><!-- fragment --> |
| 508 | </div> |
| 509 | </div> |
| 510 | <a id="a6e06adf62d53562032e738b89f3eb37c"></a> |
| 511 | <h2 class="memtitle"><span class="permalink"><a href="#a6e06adf62d53562032e738b89f3eb37c">◆ </a></span>OutputShapeOfSqueeze()</h2> |
| 512 | |
| 513 | <div class="memitem"> |
| 514 | <div class="memproto"> |
| 515 | <table class="memname"> |
| 516 | <tr> |
| 517 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> armnnTfParser::OutputShapeOfSqueeze </td> |
| 518 | <td>(</td> |
| 519 | <td class="paramtype">const tensorflow::NodeDef & </td> |
| 520 | <td class="paramname"><em>nodeDef</em>, </td> |
| 521 | </tr> |
| 522 | <tr> |
| 523 | <td class="paramkey"></td> |
| 524 | <td></td> |
| 525 | <td class="paramtype"><a class="el" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> </td> |
| 526 | <td class="paramname"><em>inputTensorInfo</em> </td> |
| 527 | </tr> |
| 528 | <tr> |
| 529 | <td></td> |
| 530 | <td>)</td> |
| 531 | <td></td><td></td> |
| 532 | </tr> |
| 533 | </table> |
| 534 | </div><div class="memdoc"> |
| 535 | |
| 536 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l02414">2414</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 537 | |
| 538 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_network.html#aea068f6094e1c3bfcdf8167b68112632">INetwork::AddActivationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a4812e0137ee610310d23059efed2cb84">INetwork::AddAdditionLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a82a5bc0d24f4c4eb1fbf793e156a5193">INetwork::AddDivisionLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a5bf8e0c150c7e6f8085c0767c6ab1914">INetwork::AddElementwiseUnaryLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a4839e4ec3f07974c57ca2c856b40cd57">INetwork::AddFullyConnectedLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a87d5ec72def73ca14bd2987a024bd569">INetwork::AddInputLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#afb8d4577c796ffdd213428cd285734b1">INetwork::AddMaximumLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a8262e9e6fc869a9c9782115a6a552f36">INetwork::AddMeanLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ae24e82cf1ae2a71c5cd976edfb192fc0">INetwork::AddMultiplicationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a74dac9efbb6dbd1982a45af1805eb4e0">INetwork::AddNormalizationLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ad8582fba2ebeb65da43a56bc22d4f88b">INetwork::AddOutputLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a4ec92bca4e51755105abb89e1878585f">INetwork::AddPooling2dLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#ac77b89eb982f9d745730c90fcbdddba4">INetwork::AddReshapeLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a53949668a151924c4aad83b176db1080">INetwork::AddSoftmaxLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a3a2dbac031f1a0b1b323916b1c7f61d2">INetwork::AddSplitterLayer()</a>, <a class="el" href="classarmnn_1_1_i_network.html#a348f95b60998a987ba20a58bfc720590">INetwork::AddStridedSliceLayer()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00419">CalcPadding()</a>, <a class="el" href="_parser_helper_8cpp_source.html#l00054">armnnUtils::CalculateReducedOutputTensoInfo()</a>, <a class="el" href="_parser_helper_8cpp_source.html#l00105">armnnUtils::CalculateStridedSliceOutputTensorInfo()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00313">CHECK_DATA_FORMAT</a>, <a class="el" href="_exceptions_8hpp_source.html#l00169">CHECK_LOCATION</a>, <a class="el" href="_tf_parser_8cpp_source.html#l00327">CHECK_PADDING_TYPE</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_tensor_8hpp_source.html#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.html#l00024">DataLayoutIndexed::GetHeightIndex()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00043">TensorShape::GetNumDimensions()</a>, <a class="el" href="_tensor_8hpp_source.html#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#ac2dac3b61c94de52093616be4ab17f8d">IConnectableLayer::GetNumOutputSlots()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.html#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.html#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_8hpp_source.html#l00169">BaseTensor< MemoryType >::GetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a9943775a364fc4ab53b85ac88f311886">IOutputSlot::GetTensorInfo()</a>, <a class="el" href="_data_layout_indexed_8hpp_source.html#l00025">DataLayoutIndexed::GetWidthIndex()</a>, <a class="el" href="_descriptors_8hpp_source.html#l00037">ActivationDescriptor::m_A</a>, <a class="el" href="_descriptors_8hpp_source.html#l00581">NormalizationDescriptor::m_Alpha</a>, <a class="el" href="_descriptors_8hpp_source.html#l00895">MeanDescriptor::m_Axis</a>, <a class="el" href="_descriptors_8hpp_source.html#l00039">ActivationDescriptor::m_B</a>, <a class="el" href="_descriptors_8hpp_source.html#l01041">StridedSliceDescriptor::m_Begin</a>, <a class="el" href="_descriptors_8hpp_source.html#l01049">StridedSliceDescriptor::m_BeginMask</a>, <a class="el" href="_descriptors_8hpp_source.html#l00583">NormalizationDescriptor::m_Beta</a>, <a class="el" href="_descriptors_8hpp_source.html#l00386">FullyConnectedDescriptor::m_BiasEnabled</a>, <a class="el" href="_descriptors_8hpp_source.html#l00369">Pooling2dDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l00587">NormalizationDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l01062">StridedSliceDescriptor::m_DataLayout</a>, <a class="el" href="_descriptors_8hpp_source.html#l01056">StridedSliceDescriptor::m_EllipsisMask</a>, <a class="el" href="_descriptors_8hpp_source.html#l01043">StridedSliceDescriptor::m_End</a>, <a class="el" href="_descriptors_8hpp_source.html#l01052">StridedSliceDescriptor::m_EndMask</a>, <a class="el" href="_descriptors_8hpp_source.html#l00035">ActivationDescriptor::m_Function</a>, <a class="el" href="_descriptors_8hpp_source.html#l00585">NormalizationDescriptor::m_K</a>, <a class="el" href="_descriptors_8hpp_source.html#l00897">MeanDescriptor::m_KeepDims</a>, <a class="el" href="_subgraph_view_selector_8cpp_source.html#l00239">m_Layer</a>, <a class="el" href="_descriptors_8hpp_source.html#l01059">StridedSliceDescriptor::m_NewAxisMask</a>, <a class="el" href="_descriptors_8hpp_source.html#l00575">NormalizationDescriptor::m_NormChannelType</a>, <a class="el" href="_descriptors_8hpp_source.html#l00577">NormalizationDescriptor::m_NormMethodType</a>, <a class="el" href="_descriptors_8hpp_source.html#l00579">NormalizationDescriptor::m_NormSize</a>, <a class="el" href="_descriptors_8hpp_source.html#l00365">Pooling2dDescriptor::m_OutputShapeRounding</a>, <a class="el" href="_descriptors_8hpp_source.html#l00355">Pooling2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.html#l00367">Pooling2dDescriptor::m_PaddingMethod</a>, <a class="el" href="_descriptors_8hpp_source.html#l00349">Pooling2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.html#l00351">Pooling2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.html#l00353">Pooling2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.html#l00359">Pooling2dDescriptor::m_PoolHeight</a>, <a class="el" href="_descriptors_8hpp_source.html#l00347">Pooling2dDescriptor::m_PoolType</a>, <a class="el" href="_descriptors_8hpp_source.html#l00357">Pooling2dDescriptor::m_PoolWidth</a>, <a class="el" href="_descriptors_8hpp_source.html#l01054">StridedSliceDescriptor::m_ShrinkAxisMask</a>, <a class="el" href="_descriptors_8hpp_source.html#l01045">StridedSliceDescriptor::m_Stride</a>, <a class="el" href="_descriptors_8hpp_source.html#l00361">Pooling2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.html#l00363">Pooling2dDescriptor::m_StrideY</a>, <a class="el" href="_descriptors_8hpp_source.html#l00774">ReshapeDescriptor::m_TargetShape</a>, <a class="el" href="namespacearmnn.html#ad1d5cce2d9e9a5d61c243e5c989112e0ad066db54b89b0912e7e7c6da51e2da51">armnn::NHWC</a>, <a class="el" href="_tf_parser_8hpp_source.html#l00097">TfParser::ParsedMatMulTfOperation</a>, <a class="el" href="_tf_parser_8hpp_source.html#l00098">TfParser::ParsedMulTfOperation</a>, <a class="el" href="_tensor_8hpp_source.html#l00090">TensorInfo::SetShape()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.html#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, <a class="el" href="_descriptors_8cpp_source.html#l00302">ViewsDescriptor::SetViewOriginCoord()</a>, and <a class="el" href="_descriptors_8cpp_source.html#l00307">ViewsDescriptor::SetViewSize()</a>.</p> |
| 539 | <div class="fragment"><div class="line"><a name="l02415"></a><span class="lineno"> 2415</span> {</div><div class="line"><a name="l02416"></a><span class="lineno"> 2416</span>  BOOST_ASSERT(nodeDef.op() == <span class="stringliteral">"Squeeze"</span>);</div><div class="line"><a name="l02417"></a><span class="lineno"> 2417</span>  <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6">tensorflow::DataType</a> tfDataType = ReadMandatoryNodeTypeAttribute(nodeDef, <span class="stringliteral">"T"</span>);</div><div class="line"><a name="l02418"></a><span class="lineno"> 2418</span> </div><div class="line"><a name="l02419"></a><span class="lineno"> 2419</span>  <a class="code" href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> type;</div><div class="line"><a name="l02420"></a><span class="lineno"> 2420</span>  <span class="keywordflow">if</span> (tfDataType == tensorflow::DT_FLOAT)</div><div class="line"><a name="l02421"></a><span class="lineno"> 2421</span>  {</div><div class="line"><a name="l02422"></a><span class="lineno"> 2422</span>  type = DataType::Float32;</div><div class="line"><a name="l02423"></a><span class="lineno"> 2423</span>  }</div><div class="line"><a name="l02424"></a><span class="lineno"> 2424</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (tfDataType == tensorflow::DT_INT32)</div><div class="line"><a name="l02425"></a><span class="lineno"> 2425</span>  {</div><div class="line"><a name="l02426"></a><span class="lineno"> 2426</span>  type = DataType::Signed32;</div><div class="line"><a name="l02427"></a><span class="lineno"> 2427</span>  }</div><div class="line"><a name="l02428"></a><span class="lineno"> 2428</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l02429"></a><span class="lineno"> 2429</span>  {</div><div class="line"><a name="l02430"></a><span class="lineno"> 2430</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l02431"></a><span class="lineno"> 2431</span>  boost::str(</div><div class="line"><a name="l02432"></a><span class="lineno"> 2432</span>  boost::format(<span class="stringliteral">"Unsupported DataType %1% for Squeeze operation %2% %3%"</span>)</div><div class="line"><a name="l02433"></a><span class="lineno"> 2433</span>  % tensorflow::DataType_Name(tfDataType)</div><div class="line"><a name="l02434"></a><span class="lineno"> 2434</span>  % nodeDef.name()</div><div class="line"><a name="l02435"></a><span class="lineno"> 2435</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02436"></a><span class="lineno"> 2436</span>  }</div><div class="line"><a name="l02437"></a><span class="lineno"> 2437</span> </div><div class="line"><a name="l02438"></a><span class="lineno"> 2438</span> </div><div class="line"><a name="l02439"></a><span class="lineno"> 2439</span>  <span class="keywordflow">if</span> (inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>() > 4)</div><div class="line"><a name="l02440"></a><span class="lineno"> 2440</span>  {</div><div class="line"><a name="l02441"></a><span class="lineno"> 2441</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l02442"></a><span class="lineno"> 2442</span>  boost::str(</div><div class="line"><a name="l02443"></a><span class="lineno"> 2443</span>  boost::format(</div><div class="line"><a name="l02444"></a><span class="lineno"> 2444</span>  <span class="stringliteral">"Unsupported number of dimensions: %1% for input shape for Squeeze %2% %3%"</span>)</div><div class="line"><a name="l02445"></a><span class="lineno"> 2445</span>  % inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>()</div><div class="line"><a name="l02446"></a><span class="lineno"> 2446</span>  % nodeDef.name()</div><div class="line"><a name="l02447"></a><span class="lineno"> 2447</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02448"></a><span class="lineno"> 2448</span>  }</div><div class="line"><a name="l02449"></a><span class="lineno"> 2449</span> </div><div class="line"><a name="l02450"></a><span class="lineno"> 2450</span>  std::vector<uint32_t> squeezeDims = ReadOptionalNodeUint32ListAttribute(nodeDef, <span class="stringliteral">"squeeze_dims"</span>);</div><div class="line"><a name="l02451"></a><span class="lineno"> 2451</span>  <span class="keyword">static</span> <span class="keyword">const</span> uint32_t dimensionSequence[] = { 0, 1, 2, 3 };</div><div class="line"><a name="l02452"></a><span class="lineno"> 2452</span> </div><div class="line"><a name="l02453"></a><span class="lineno"> 2453</span>  <span class="keywordflow">if</span> (squeezeDims.empty())</div><div class="line"><a name="l02454"></a><span class="lineno"> 2454</span>  {</div><div class="line"><a name="l02455"></a><span class="lineno"> 2455</span>  squeezeDims.assign(dimensionSequence,</div><div class="line"><a name="l02456"></a><span class="lineno"> 2456</span>  dimensionSequence+inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>());</div><div class="line"><a name="l02457"></a><span class="lineno"> 2457</span>  }</div><div class="line"><a name="l02458"></a><span class="lineno"> 2458</span> </div><div class="line"><a name="l02459"></a><span class="lineno"> 2459</span>  std::vector<uint32_t> outputDims;</div><div class="line"><a name="l02460"></a><span class="lineno"> 2460</span>  <span class="keywordflow">for</span>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>(); i++)</div><div class="line"><a name="l02461"></a><span class="lineno"> 2461</span>  {</div><div class="line"><a name="l02462"></a><span class="lineno"> 2462</span>  <span class="keywordtype">bool</span> skipSqueeze = (std::find(squeezeDims.begin(), squeezeDims.end(), i) == squeezeDims.end());</div><div class="line"><a name="l02463"></a><span class="lineno"> 2463</span>  <span class="keyword">auto</span> currentDimension = inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l02464"></a><span class="lineno"> 2464</span>  <span class="keywordflow">if</span> (skipSqueeze || currentDimension != 1)</div><div class="line"><a name="l02465"></a><span class="lineno"> 2465</span>  {</div><div class="line"><a name="l02466"></a><span class="lineno"> 2466</span>  outputDims.push_back(currentDimension);</div><div class="line"><a name="l02467"></a><span class="lineno"> 2467</span>  }</div><div class="line"><a name="l02468"></a><span class="lineno"> 2468</span>  }</div><div class="line"><a name="l02469"></a><span class="lineno"> 2469</span> </div><div class="line"><a name="l02470"></a><span class="lineno"> 2470</span>  <span class="keywordflow">if</span> (outputDims.size() > 4)</div><div class="line"><a name="l02471"></a><span class="lineno"> 2471</span>  {</div><div class="line"><a name="l02472"></a><span class="lineno"> 2472</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.html">ParseException</a>(</div><div class="line"><a name="l02473"></a><span class="lineno"> 2473</span>  boost::str(</div><div class="line"><a name="l02474"></a><span class="lineno"> 2474</span>  boost::format(</div><div class="line"><a name="l02475"></a><span class="lineno"> 2475</span>  <span class="stringliteral">"Unsupported number of dimensions: %1% for output shape for Squeeze %2% %3%"</span>)</div><div class="line"><a name="l02476"></a><span class="lineno"> 2476</span>  % outputDims.size()</div><div class="line"><a name="l02477"></a><span class="lineno"> 2477</span>  % nodeDef.name()</div><div class="line"><a name="l02478"></a><span class="lineno"> 2478</span>  % <a class="code" href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l02479"></a><span class="lineno"> 2479</span>  }</div><div class="line"><a name="l02480"></a><span class="lineno"> 2480</span> </div><div class="line"><a name="l02481"></a><span class="lineno"> 2481</span>  <a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a> outShape = <a class="code" href="classarmnn_1_1_tensor_shape.html">TensorShape</a>(static_cast<unsigned int>(outputDims.size()),</div><div class="line"><a name="l02482"></a><span class="lineno"> 2482</span>  outputDims.data());</div><div class="line"><a name="l02483"></a><span class="lineno"> 2483</span> </div><div class="line"><a name="l02484"></a><span class="lineno"> 2484</span>  <a class="code" href="classarmnn_1_1_tensor_info.html">TensorInfo</a> outTensorInfo = inputTensorInfo;</div><div class="line"><a name="l02485"></a><span class="lineno"> 2485</span>  outTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(outShape);</div><div class="line"><a name="l02486"></a><span class="lineno"> 2486</span>  outTensorInfo.SetDataType(type);</div><div class="line"><a name="l02487"></a><span class="lineno"> 2487</span> </div><div class="line"><a name="l02488"></a><span class="lineno"> 2488</span>  <span class="keywordflow">return</span> outTensorInfo;</div><div class="line"><a name="l02489"></a><span class="lineno"> 2489</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_html_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#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.html#l00092">Tensor.hpp:92</a></div></div> |
| 540 | <div class="ttc" id="classarmnn_1_1_tensor_info_html"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00053">Tensor.hpp:53</a></div></div> |
| 541 | <div class="ttc" id="classarmnn_1_1_parse_exception_html"><div class="ttname"><a href="classarmnn_1_1_parse_exception.html">armnn::ParseException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00092">Exceptions.hpp:92</a></div></div> |
| 542 | <div class="ttc" id="_exceptions_8hpp_html_aa3be76aec4ce713822a5ea1ecbb7bc61"><div class="ttname"><a href="_exceptions_8hpp.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a></div><div class="ttdeci">#define CHECK_LOCATION()</div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.html#l00169">Exceptions.hpp:169</a></div></div> |
| 543 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00090">Tensor.hpp:90</a></div></div> |
| 544 | <div class="ttc" id="namespacearmnn_html_ad8ed01ff3ff33333d8e19db4d2818bb6"><div class="ttname"><a href="namespacearmnn.html#ad8ed01ff3ff33333d8e19db4d2818bb6">armnn::DataType</a></div><div class="ttdeci">DataType</div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.html#l00032">Types.hpp:32</a></div></div> |
| 545 | <div class="ttc" id="classarmnn_1_1_tensor_shape_html"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.html">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00020">Tensor.hpp:20</a></div></div> |
| 546 | <div class="ttc" id="classarmnn_1_1_tensor_info_html_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.html#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.html#l00088">Tensor.hpp:88</a></div></div> |
| 547 | </div><!-- fragment --> |
| 548 | </div> |
| 549 | </div> |
| 550 | </div><!-- contents --> |
| 551 | </div><!-- doc-content --> |
| 552 | <!-- start footer part --> |
| 553 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 554 | <ul> |
| 555 | <li class="navelem"><a class="el" href="namespacearmnn_tf_parser.html">armnnTfParser</a></li> |
| 556 | <li class="footer">Generated on Fri Mar 13 2020 16:07:06 for ArmNN by |
| 557 | <a href="http://www.doxygen.org/index.html"> |
| 558 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 559 | </ul> |
| 560 | </div> |
| 561 | </body> |
| 562 | </html> |