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: src/armnnTfParser/TfParser.cpp File 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('_tf_parser_8cpp.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="#namespaces">Namespaces</a> | |
| 85 | <a href="#define-members">Macros</a> | |
| 86 | <a href="#func-members">Functions</a> </div> |
| 87 | <div class="headertitle"> |
| 88 | <div class="title">TfParser.cpp File Reference</div> </div> |
| 89 | </div><!--header--> |
| 90 | <div class="contents"> |
| 91 | <div class="textblock"><code>#include "<a class="el" href="_tf_parser_8hpp_source.html">TfParser.hpp</a>"</code><br /> |
| 92 | <code>#include <<a class="el" href="_types_utils_8hpp_source.html">armnn/TypesUtils.hpp</a>></code><br /> |
| 93 | <code>#include <<a class="el" href="_descriptors_8hpp_source.html">armnn/Descriptors.hpp</a>></code><br /> |
| 94 | <code>#include <<a class="el" href="_permute_8hpp_source.html">armnnUtils/Permute.hpp</a>></code><br /> |
| 95 | <code>#include <<a class="el" href="_data_layout_indexed_8hpp_source.html">armnnUtils/DataLayoutIndexed.hpp</a>></code><br /> |
| 96 | <code>#include <<a class="el" href="_graph_topological_sort_8hpp_source.html">GraphTopologicalSort.hpp</a>></code><br /> |
| 97 | <code>#include <<a class="el" href="_parser_helper_8hpp_source.html">ParserHelper.hpp</a>></code><br /> |
| 98 | <code>#include <google/protobuf/io/zero_copy_stream_impl.h></code><br /> |
| 99 | <code>#include <google/protobuf/text_format.h></code><br /> |
| 100 | <code>#include <tensorflow/core/framework/graph.pb.h></code><br /> |
| 101 | <code>#include <boost/format.hpp></code><br /> |
| 102 | <code>#include <boost/core/ignore_unused.hpp></code><br /> |
| 103 | <code>#include <boost/numeric/conversion/cast.hpp></code><br /> |
| 104 | <code>#include <boost/polymorphic_cast.hpp></code><br /> |
| 105 | <code>#include <numeric></code><br /> |
| 106 | </div> |
| 107 | <p><a href="_tf_parser_8cpp_source.html">Go to the source code of this file.</a></p> |
| 108 | <table class="memberdecls"> |
| 109 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="namespaces"></a> |
| 110 | Namespaces</h2></td></tr> |
| 111 | <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.html">armnnTfParser</a></td></tr> |
| 112 | <tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr> |
| 113 | </table><table class="memberdecls"> |
| 114 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a> |
| 115 | Macros</h2></td></tr> |
| 116 | <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.html#a3fb047570644cae325aa88d3cd7bb96e">CHECK_DATA_FORMAT</a>(NODE_DEF, FORMAT, NODE_TYPE)</td></tr> |
| 117 | <tr class="separator:a3fb047570644cae325aa88d3cd7bb96e"><td class="memSeparator" colspan="2"> </td></tr> |
| 118 | <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.html#aab838eb7734e531bb5be6f6dece673bf">CHECK_PADDING_TYPE</a>(NODE_DEF, PADDING)</td></tr> |
| 119 | <tr class="separator:aab838eb7734e531bb5be6f6dece673bf"><td class="memSeparator" colspan="2"> </td></tr> |
| 120 | </table><table class="memberdecls"> |
| 121 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 122 | Functions</h2></td></tr> |
| 123 | <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> |
| 124 | <tr class="separator:a0540bb475d62bab024eebe8685181845"><td class="memSeparator" colspan="2"> </td></tr> |
| 125 | <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> |
| 126 | <tr class="separator:aa78bf8d20e213dcd13d48072dfa9cd1f"><td class="memSeparator" colspan="2"> </td></tr> |
| 127 | <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> |
| 128 | <tr class="separator:a3d934e14ca544ba7af4fe562def8a986"><td class="memSeparator" colspan="2"> </td></tr> |
| 129 | <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> |
| 130 | <tr class="separator:a22ac203831113ee3e429746f6055aa73"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <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> |
| 132 | <tr class="separator:ae5488f1478c62281c5e937e79ebcd145"><td class="memSeparator" colspan="2"> </td></tr> |
| 133 | <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> |
| 134 | <tr class="separator:a9c18860db8b032de579c5ad94cbae5d0"><td class="memSeparator" colspan="2"> </td></tr> |
| 135 | <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> |
| 136 | <tr class="separator:a6e06adf62d53562032e738b89f3eb37c"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | </table> |
| 138 | <h2 class="groupheader">Macro Definition Documentation</h2> |
| 139 | <a id="a3fb047570644cae325aa88d3cd7bb96e"></a> |
| 140 | <h2 class="memtitle"><span class="permalink"><a href="#a3fb047570644cae325aa88d3cd7bb96e">◆ </a></span>CHECK_DATA_FORMAT</h2> |
| 141 | |
| 142 | <div class="memitem"> |
| 143 | <div class="memproto"> |
| 144 | <table class="memname"> |
| 145 | <tr> |
| 146 | <td class="memname">#define CHECK_DATA_FORMAT</td> |
| 147 | <td>(</td> |
| 148 | <td class="paramtype"> </td> |
| 149 | <td class="paramname">NODE_DEF, </td> |
| 150 | </tr> |
| 151 | <tr> |
| 152 | <td class="paramkey"></td> |
| 153 | <td></td> |
| 154 | <td class="paramtype"> </td> |
| 155 | <td class="paramname">FORMAT, </td> |
| 156 | </tr> |
| 157 | <tr> |
| 158 | <td class="paramkey"></td> |
| 159 | <td></td> |
| 160 | <td class="paramtype"> </td> |
| 161 | <td class="paramname">NODE_TYPE </td> |
| 162 | </tr> |
| 163 | <tr> |
| 164 | <td></td> |
| 165 | <td>)</td> |
| 166 | <td></td><td></td> |
| 167 | </tr> |
| 168 | </table> |
| 169 | </div><div class="memdoc"> |
| 170 | <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.html">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.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString())); \</div><div class="line"> }</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> |
| 171 | <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> |
| 172 | </div><!-- fragment --> |
| 173 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l00313">313</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 174 | |
| 175 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.html#l00931">armnnTfParser::ConvertTfTensorDataType()</a>, <a class="el" href="_tf_parser_8cpp_source.html#l01466">armnnTfParser::OutputShapeOfExpandDims()</a>, and <a class="el" href="_tf_parser_8cpp_source.html#l02414">armnnTfParser::OutputShapeOfSqueeze()</a>.</p> |
| 176 | |
| 177 | </div> |
| 178 | </div> |
| 179 | <a id="aab838eb7734e531bb5be6f6dece673bf"></a> |
| 180 | <h2 class="memtitle"><span class="permalink"><a href="#aab838eb7734e531bb5be6f6dece673bf">◆ </a></span>CHECK_PADDING_TYPE</h2> |
| 181 | |
| 182 | <div class="memitem"> |
| 183 | <div class="memproto"> |
| 184 | <table class="memname"> |
| 185 | <tr> |
| 186 | <td class="memname">#define CHECK_PADDING_TYPE</td> |
| 187 | <td>(</td> |
| 188 | <td class="paramtype"> </td> |
| 189 | <td class="paramname">NODE_DEF, </td> |
| 190 | </tr> |
| 191 | <tr> |
| 192 | <td class="paramkey"></td> |
| 193 | <td></td> |
| 194 | <td class="paramtype"> </td> |
| 195 | <td class="paramname">PADDING </td> |
| 196 | </tr> |
| 197 | <tr> |
| 198 | <td></td> |
| 199 | <td>)</td> |
| 200 | <td></td><td></td> |
| 201 | </tr> |
| 202 | </table> |
| 203 | </div><div class="memdoc"> |
| 204 | <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.html">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.html#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString())); \</div><div class="line"> } \</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> |
| 205 | <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> |
| 206 | </div><!-- fragment --> |
| 207 | <p class="definition">Definition at line <a class="el" href="_tf_parser_8cpp_source.html#l00327">327</a> of file <a class="el" href="_tf_parser_8cpp_source.html">TfParser.cpp</a>.</p> |
| 208 | |
| 209 | <p class="reference">Referenced by <a class="el" href="_tf_parser_8cpp_source.html#l00931">armnnTfParser::ConvertTfTensorDataType()</a>, and <a class="el" href="_tf_parser_8cpp_source.html#l02414">armnnTfParser::OutputShapeOfSqueeze()</a>.</p> |
| 210 | |
| 211 | </div> |
| 212 | </div> |
| 213 | </div><!-- contents --> |
| 214 | </div><!-- doc-content --> |
| 215 | <!-- start footer part --> |
| 216 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 217 | <ul> |
| 218 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_50aba35e23cba3c8856f8642cc06d5dc.html">armnnTfParser</a></li><li class="navelem"><a class="el" href="_tf_parser_8cpp.html">TfParser.cpp</a></li> |
| 219 | <li class="footer">Generated on Fri Mar 13 2020 16:06:59 for ArmNN by |
| 220 | <a href="http://www.doxygen.org/index.html"> |
| 221 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 222 | </ul> |
| 223 | </div> |
| 224 | </body> |
| 225 | </html> |