Ryan OShea | de36e4a | 2020-03-13 16:26:19 +0000 | [diff] [blame] | 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: src/armnnTfParser/TfParser.cpp File 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 |  <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('_tf_parser_8cpp.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="#namespaces">Namespaces</a> | |
| 99 | <a href="#define-members">Macros</a> | |
| 100 | <a href="#func-members">Functions</a> </div> |
| 101 | <div class="headertitle"> |
| 102 | <div class="title">TfParser.cpp File Reference</div> </div> |
| 103 | </div><!--header--> |
| 104 | <div class="contents"> |
| 105 | <div class="textblock"><code>#include "<a class="el" href="_tf_parser_8hpp_source.xhtml">TfParser.hpp</a>"</code><br /> |
| 106 | <code>#include <<a class="el" href="_types_utils_8hpp_source.xhtml">armnn/TypesUtils.hpp</a>></code><br /> |
| 107 | <code>#include <<a class="el" href="_descriptors_8hpp_source.xhtml">armnn/Descriptors.hpp</a>></code><br /> |
| 108 | <code>#include <<a class="el" href="_permute_8hpp_source.xhtml">armnnUtils/Permute.hpp</a>></code><br /> |
| 109 | <code>#include <<a class="el" href="_data_layout_indexed_8hpp_source.xhtml">armnnUtils/DataLayoutIndexed.hpp</a>></code><br /> |
| 110 | <code>#include <<a class="el" href="_transpose_8hpp_source.xhtml">armnnUtils/Transpose.hpp</a>></code><br /> |
| 111 | <code>#include <<a class="el" href="_ignore_unused_8hpp_source.xhtml">armnn/utility/IgnoreUnused.hpp</a>></code><br /> |
| 112 | <code>#include <<a class="el" href="_graph_topological_sort_8hpp_source.xhtml">GraphTopologicalSort.hpp</a>></code><br /> |
| 113 | <code>#include <<a class="el" href="_parser_helper_8hpp_source.xhtml">ParserHelper.hpp</a>></code><br /> |
| 114 | <code>#include <google/protobuf/io/zero_copy_stream_impl.h></code><br /> |
| 115 | <code>#include <google/protobuf/text_format.h></code><br /> |
| 116 | <code>#include <tensorflow/core/framework/graph.pb.h></code><br /> |
| 117 | <code>#include <boost/format.hpp></code><br /> |
| 118 | <code>#include <boost/numeric/conversion/cast.hpp></code><br /> |
| 119 | <code>#include <boost/polymorphic_cast.hpp></code><br /> |
| 120 | <code>#include <numeric></code><br /> |
| 121 | </div> |
| 122 | <p><a href="_tf_parser_8cpp_source.xhtml">Go to the source code of this file.</a></p> |
| 123 | <table class="memberdecls"> |
| 124 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> |
| 125 | Namespaces</h2></td></tr> |
| 126 | <tr class="memitem:namespacearmnn_tf_parser"><td class="memItemLeft" align="right" valign="top">  </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml">armnnTfParser</a></td></tr> |
| 127 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | </table><table class="memberdecls"> |
| 129 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 130 | Macros</h2></td></tr> |
| 131 | <tr class="memitem:a3fb047570644cae325aa88d3cd7bb96e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_tf_parser_8cpp.xhtml#a3fb047570644cae325aa88d3cd7bb96e">CHECK_DATA_FORMAT</a>(NODE_DEF, FORMAT, NODE_TYPE)</td></tr> |
| 132 | <tr class="separator:a3fb047570644cae325aa88d3cd7bb96e"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <tr class="memitem:aab838eb7734e531bb5be6f6dece673bf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="_tf_parser_8cpp.xhtml#aab838eb7734e531bb5be6f6dece673bf">CHECK_PADDING_TYPE</a>(NODE_DEF, PADDING)</td></tr> |
| 134 | <tr class="separator:aab838eb7734e531bb5be6f6dece673bf"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | </table><table class="memberdecls"> |
| 136 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 137 | Functions</h2></td></tr> |
| 138 | <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.xhtml#a0540bb475d62bab024eebe8685181845">CalculateSamePadding</a> (uint32_t inputSize, uint32_t stride, uint32_t filterSize, bool samePadding, uint32_t *paddingFront, uint32_t *paddingBack)</td></tr> |
| 139 | <tr class="separator:a0540bb475d62bab024eebe8685181845"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <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.xhtml#aa78bf8d20e213dcd13d48072dfa9cd1f">CalcPadding</a> (uint32_t input, uint32_t kernel, uint32_t stride, uint32_t &outPadHead, uint32_t &outPadTail, bool samePadding)</td></tr> |
| 141 | <tr class="separator:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memSeparator" colspan="2"> </td></tr> |
| 142 | <tr class="memitem:a3d934e14ca544ba7af4fe562def8a986"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6">DataType</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a3d934e14ca544ba7af4fe562def8a986">ConvertTfTensorDataType</a> (const tensorflow::DataType tfDataType, const tensorflow::NodeDef &nodeDef)</td></tr> |
| 143 | <tr class="separator:a3d934e14ca544ba7af4fe562def8a986"><td class="memSeparator" colspan="2"> </td></tr> |
| 144 | <tr class="memitem:a22ac203831113ee3e429746f6055aa73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a22ac203831113ee3e429746f6055aa73">OutputShapeOfExpandDims</a> (const tensorflow::NodeDef &nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo)</td></tr> |
| 145 | <tr class="separator:a22ac203831113ee3e429746f6055aa73"><td class="memSeparator" colspan="2"> </td></tr> |
| 146 | <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.xhtml#ae5488f1478c62281c5e937e79ebcd145">CheckPaddingTensor</a> (const <a class="el" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> &paddingTensor, const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> &inputTensorInfo, const std::string &nodeName)</td></tr> |
| 147 | <tr class="separator:ae5488f1478c62281c5e937e79ebcd145"><td class="memSeparator" colspan="2"> </td></tr> |
| 148 | <tr class="memitem:a9c18860db8b032de579c5ad94cbae5d0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> </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> &inputTensorInfo, const std::vector< std::pair< unsigned int, unsigned int >> &padList)</td></tr> |
| 149 | <tr class="separator:a9c18860db8b032de579c5ad94cbae5d0"><td class="memSeparator" colspan="2"> </td></tr> |
| 150 | <tr class="memitem:a6e06adf62d53562032e738b89f3eb37c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacearmnn_tf_parser.xhtml#a6e06adf62d53562032e738b89f3eb37c">OutputShapeOfSqueeze</a> (const tensorflow::NodeDef &nodeDef, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> inputTensorInfo)</td></tr> |
| 151 | <tr class="separator:a6e06adf62d53562032e738b89f3eb37c"><td class="memSeparator" colspan="2"> </td></tr> |
| 152 | </table> |
| 153 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 154 | <a id="a3fb047570644cae325aa88d3cd7bb96e"></a> |
| 155 | <h2 class="memtitle"><span class="permalink"><a href="#a3fb047570644cae325aa88d3cd7bb96e">◆ </a></span>CHECK_DATA_FORMAT</h2> |
| 156 | |
| 157 | <div class="memitem"> |
| 158 | <div class="memproto"> |
| 159 | <table class="memname"> |
| 160 | <tr> |
| 161 | <td class="memname">#define CHECK_DATA_FORMAT</td> |
| 162 | <td>(</td> |
| 163 | <td class="paramtype"> </td> |
| 164 | <td class="paramname">NODE_DEF, </td> |
| 165 | </tr> |
| 166 | <tr> |
| 167 | <td class="paramkey"></td> |
| 168 | <td></td> |
| 169 | <td class="paramtype"> </td> |
| 170 | <td class="paramname">FORMAT, </td> |
| 171 | </tr> |
| 172 | <tr> |
| 173 | <td class="paramkey"></td> |
| 174 | <td></td> |
| 175 | <td class="paramtype"> </td> |
| 176 | <td class="paramname">NODE_TYPE </td> |
| 177 | </tr> |
| 178 | <tr> |
| 179 | <td></td> |
| 180 | <td>)</td> |
| 181 | <td></td><td></td> |
| 182 | </tr> |
| 183 | </table> |
| 184 | </div><div class="memdoc"> |
| 185 | <b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span>( FORMAT != <span class="stringliteral">"NHWC"</span> && FORMAT != <span class="stringliteral">"NCHW"</span> ) \</div><div class="line"> { \</div><div class="line"> throw <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>( \</div><div class="line"> boost::str( \</div><div class="line"> boost::format( \</div><div class="line"> <span class="stringliteral">"Unsupported data format %1% passed for %2% node %3%. "</span> \</div><div class="line"> <span class="stringliteral">"Only NHWC and NCHW supported %4%"</span>) \</div><div class="line"> % FORMAT \</div><div class="line"> % NODE_TYPE \</div><div class="line"> % NODE_DEF.name() \</div><div class="line"> % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString())); \</div><div class="line"> }</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> |
| 186 | <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> |
| 187 | </div><!-- fragment --> |
| 188 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l00314">314</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p> |
| 189 | |
| 190 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.xhtml#l00933">armnnTfParser::ConvertTfTensorDataType()</a>, <a class="el" href="_tf_parser_8cpp_source.xhtml#l01468">armnnTfParser::OutputShapeOfExpandDims()</a>, and <a class="el" href="_tf_parser_8cpp_source.xhtml#l02463">armnnTfParser::OutputShapeOfSqueeze()</a>.</p> |
| 191 | |
| 192 | </div> |
| 193 | </div> |
| 194 | <a id="aab838eb7734e531bb5be6f6dece673bf"></a> |
| 195 | <h2 class="memtitle"><span class="permalink"><a href="#aab838eb7734e531bb5be6f6dece673bf">◆ </a></span>CHECK_PADDING_TYPE</h2> |
| 196 | |
| 197 | <div class="memitem"> |
| 198 | <div class="memproto"> |
| 199 | <table class="memname"> |
| 200 | <tr> |
| 201 | <td class="memname">#define CHECK_PADDING_TYPE</td> |
| 202 | <td>(</td> |
| 203 | <td class="paramtype"> </td> |
| 204 | <td class="paramname">NODE_DEF, </td> |
| 205 | </tr> |
| 206 | <tr> |
| 207 | <td class="paramkey"></td> |
| 208 | <td></td> |
| 209 | <td class="paramtype"> </td> |
| 210 | <td class="paramname">PADDING </td> |
| 211 | </tr> |
| 212 | <tr> |
| 213 | <td></td> |
| 214 | <td>)</td> |
| 215 | <td></td><td></td> |
| 216 | </tr> |
| 217 | </table> |
| 218 | </div><div class="memdoc"> |
| 219 | <b>Value:</b><div class="fragment"><div class="line"><span class="keywordflow">if</span>(PADDING != <span class="stringliteral">"SAME"</span> && PADDING != <span class="stringliteral">"VALID"</span> ) \</div><div class="line"> { \</div><div class="line"> throw <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>( \</div><div class="line"> boost::str( \</div><div class="line"> boost::format( \</div><div class="line"> <span class="stringliteral">"Only 'SAME' and 'VALID' padding supported. Got %1% for %2% %3%"</span>) \</div><div class="line"> % PADDING \</div><div class="line"> % NODE_DEF.name() \</div><div class="line"> % <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString())); \</div><div class="line"> } \</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> |
| 220 | <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> |
| 221 | </div><!-- fragment --> |
| 222 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.xhtml#l00328">328</a> of file <a class="el" href="_tf_parser_8cpp_source.xhtml">TfParser.cpp</a>.</p> |
| 223 | |
| 224 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.xhtml#l00933">armnnTfParser::ConvertTfTensorDataType()</a>, and <a class="el" href="_tf_parser_8cpp_source.xhtml#l02463">armnnTfParser::OutputShapeOfSqueeze()</a>.</p> |
| 225 | |
| 226 | </div> |
| 227 | </div> |
| 228 | </div><!-- contents --> |
| 229 | </div><!-- doc-content --> |
| 230 | <!-- start footer part --> |
| 231 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 232 | <ul> |
| 233 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_50aba35e23cba3c8856f8642cc06d5dc.xhtml">armnnTfParser</a></li><li class="navelem"><a class="el" href="_tf_parser_8cpp.xhtml">TfParser.cpp</a></li> |
| 234 | <li class="footer">Generated on Fri Mar 13 2020 16:09:14 for ArmNN by |
| 235 | <a href="http://www.doxygen.org/index.html"> |
| 236 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 237 | </ul> |
| 238 | </div> |
| 239 | </body> |
| 240 | </html> |