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: CaffeParserBase Class 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('classarmnn_caffe_parser_1_1_caffe_parser_base.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="#pub-methods">Public Member Functions</a> | |
| 99 | <a href="#pro-types">Protected Types</a> | |
| 100 | <a href="#pro-methods">Protected Member Functions</a> | |
| 101 | <a href="#pro-static-methods">Static Protected Member Functions</a> | |
| 102 | <a href="#pro-attribs">Protected Attributes</a> | |
| 103 | <a href="#pro-static-attribs">Static Protected Attributes</a> | |
| 104 | <a href="classarmnn_caffe_parser_1_1_caffe_parser_base-members.xhtml">List of all members</a> </div> |
| 105 | <div class="headertitle"> |
| 106 | <div class="title">CaffeParserBase Class Reference</div> </div> |
| 107 | </div><!--header--> |
| 108 | <div class="contents"> |
| 109 | |
| 110 | <p><code>#include <<a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>></code></p> |
| 111 | <div class="dynheader"> |
| 112 | Inheritance diagram for CaffeParserBase:</div> |
| 113 | <div class="dyncontent"> |
| 114 | <div class="center"> |
| 115 | <img src="classarmnn_caffe_parser_1_1_caffe_parser_base.png" usemap="#CaffeParserBase_map" alt=""/> |
| 116 | <map id="CaffeParserBase_map" name="CaffeParserBase_map"> |
| 117 | <area href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml" alt="ICaffeParser" shape="rect" coords="94,0,272,24"/> |
| 118 | <area href="classarmnn_caffe_parser_1_1_caffe_parser.xhtml" alt="CaffeParser" shape="rect" coords="0,112,178,136"/> |
| 119 | <area href="classarmnn_caffe_parser_1_1_record_by_record_caffe_parser.xhtml" alt="RecordByRecordCaffeParser" shape="rect" coords="188,112,366,136"/> |
| 120 | </map> |
| 121 | </div></div> |
| 122 | <table class="memberdecls"> |
| 123 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 124 | Public Member Functions</h2></td></tr> |
| 125 | <tr class="memitem:ae2d544957c50461d305b2517581c86d0"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ae2d544957c50461d305b2517581c86d0">CreateNetworkFromTextFile</a> (const char *graphFile, const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > &inputShapes, const std::vector< std::string > &requestedOutputs) override</td></tr> |
| 126 | <tr class="memdesc:ae2d544957c50461d305b2517581c86d0"><td class="mdescLeft"> </td><td class="mdescRight">Create the network from a protobuf text file on disk. <a href="#ae2d544957c50461d305b2517581c86d0">More...</a><br /></td></tr> |
| 127 | <tr class="separator:ae2d544957c50461d305b2517581c86d0"><td class="memSeparator" colspan="2"> </td></tr> |
| 128 | <tr class="memitem:acd82aa5171feb1c852506964f3c5254b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#acd82aa5171feb1c852506964f3c5254b">CreateNetworkFromString</a> (const char *protoText, const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > &inputShapes, const std::vector< std::string > &requestedOutputs) override</td></tr> |
| 129 | <tr class="memdesc:acd82aa5171feb1c852506964f3c5254b"><td class="mdescLeft"> </td><td class="mdescRight">Creates the network directly from protobuf text in a string. Useful for debugging/testing. <a href="#acd82aa5171feb1c852506964f3c5254b">More...</a><br /></td></tr> |
| 130 | <tr class="separator:acd82aa5171feb1c852506964f3c5254b"><td class="memSeparator" colspan="2"> </td></tr> |
| 131 | <tr class="memitem:aba39201ebaeb0738f15a14b3c8da1f5a"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aba39201ebaeb0738f15a14b3c8da1f5a">GetNetworkInputBindingInfo</a> (const std::string &name) const override</td></tr> |
| 132 | <tr class="memdesc:aba39201ebaeb0738f15a14b3c8da1f5a"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves binding info (layer id and tensor info) for the network input identified by the given layer name. <a href="#aba39201ebaeb0738f15a14b3c8da1f5a">More...</a><br /></td></tr> |
| 133 | <tr class="separator:aba39201ebaeb0738f15a14b3c8da1f5a"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:aee8c8fa7de3c87392791d9f8dd90655f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aee8c8fa7de3c87392791d9f8dd90655f">GetNetworkOutputBindingInfo</a> (const std::string &name) const override</td></tr> |
| 135 | <tr class="memdesc:aee8c8fa7de3c87392791d9f8dd90655f"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves binding info (layer id and tensor info) for the network output identified by the given layer name. <a href="#aee8c8fa7de3c87392791d9f8dd90655f">More...</a><br /></td></tr> |
| 136 | <tr class="separator:aee8c8fa7de3c87392791d9f8dd90655f"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:a75b607432cb087d384e2424aa782af89"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a75b607432cb087d384e2424aa782af89">CaffeParserBase</a> ()</td></tr> |
| 138 | <tr class="separator:a75b607432cb087d384e2424aa782af89"><td class="memSeparator" colspan="2"> </td></tr> |
| 139 | <tr class="inherit_header pub_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classarmnn_caffe_parser_1_1_i_caffe_parser')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml">ICaffeParser</a></td></tr> |
| 140 | <tr class="memitem:a55a1948e089db582acefcb0bb8921ad3 inherit pub_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a55a1948e089db582acefcb0bb8921ad3">CreateNetworkFromBinaryFile</a> (const char *graphFile, const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > &inputShapes, const std::vector< std::string > &requestedOutputs)=0</td></tr> |
| 141 | <tr class="memdesc:a55a1948e089db582acefcb0bb8921ad3 inherit pub_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="mdescLeft"> </td><td class="mdescRight">Create the network from a protobuf binary file on the disk. <a href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a55a1948e089db582acefcb0bb8921ad3">More...</a><br /></td></tr> |
| 142 | <tr class="separator:a55a1948e089db582acefcb0bb8921ad3 inherit pub_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memSeparator" colspan="2"> </td></tr> |
| 143 | </table><table class="memberdecls"> |
| 144 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a> |
| 145 | Protected Types</h2></td></tr> |
| 146 | <tr class="memitem:a92e74211c7da4501270bc01a6acef64c"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a92e74211c7da4501270bc01a6acef64c">OperationParsingFunction</a> = void(CaffeParserBase::*)(const caffe::LayerParameter &layerParam)</td></tr> |
| 147 | <tr class="separator:a92e74211c7da4501270bc01a6acef64c"><td class="memSeparator" colspan="2"> </td></tr> |
| 148 | </table><table class="memberdecls"> |
| 149 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> |
| 150 | Protected Member Functions</h2></td></tr> |
| 151 | <tr class="memitem:a77e6c08b48c99fafa560805270503856"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a> (const caffe::BlobShape &blobShape) const</td></tr> |
| 152 | <tr class="memdesc:a77e6c08b48c99fafa560805270503856"><td class="mdescLeft"> </td><td class="mdescRight">Converts Caffe's protobuf tensor shape format to ArmNN's. <a href="#a77e6c08b48c99fafa560805270503856">More...</a><br /></td></tr> |
| 153 | <tr class="separator:a77e6c08b48c99fafa560805270503856"><td class="memSeparator" colspan="2"> </td></tr> |
| 154 | <tr class="memitem:a2a1112c66d08e3760ecccf39c7854a90"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2a1112c66d08e3760ecccf39c7854a90">TrackInputBinding</a> (<a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> *layer, <a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> id, const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> &tensorInfo)</td></tr> |
| 155 | <tr class="separator:a2a1112c66d08e3760ecccf39c7854a90"><td class="memSeparator" colspan="2"> </td></tr> |
| 156 | <tr class="memitem:a0c98e07875a82c71c65bbb53eb347561"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0c98e07875a82c71c65bbb53eb347561">TrackOutputBinding</a> (<a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> *layer, <a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> id, const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> &tensorInfo)</td></tr> |
| 157 | <tr class="separator:a0c98e07875a82c71c65bbb53eb347561"><td class="memSeparator" colspan="2"> </td></tr> |
| 158 | <tr class="memitem:a0767b1c7ee9cbd014fd97c701a954caa"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a> (const std::string &caffeTopName, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a> &armnnOutputSlot)</td></tr> |
| 159 | <tr class="separator:a0767b1c7ee9cbd014fd97c701a954caa"><td class="memSeparator" colspan="2"> </td></tr> |
| 160 | <tr class="memitem:a9650b8810d4e6734b255ca25d495fe06"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a> (const std::string &caffeTopName) const</td></tr> |
| 161 | <tr class="memdesc:a9650b8810d4e6734b255ca25d495fe06"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the Armnn IOutputSlot representing the given Caffe top. <a href="#a9650b8810d4e6734b255ca25d495fe06">More...</a><br /></td></tr> |
| 162 | <tr class="separator:a9650b8810d4e6734b255ca25d495fe06"><td class="memSeparator" colspan="2"> </td></tr> |
| 163 | <tr class="memitem:ae89a123aad1c66a76c398b7af216aae4"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ae89a123aad1c66a76c398b7af216aae4">Cleanup</a> ()</td></tr> |
| 164 | <tr class="separator:ae89a123aad1c66a76c398b7af216aae4"><td class="memSeparator" colspan="2"> </td></tr> |
| 165 | <tr class="memitem:ab0bb4b8a290f1c8acd3c3a0d9a6e9783"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">CreateNetworkFromNetParameter</a> (caffe::NetParameter &netParam, const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > &inputShapes, const std::vector< std::string > &requestedOutputs)</td></tr> |
| 166 | <tr class="memdesc:ab0bb4b8a290f1c8acd3c3a0d9a6e9783"><td class="mdescLeft"> </td><td class="mdescRight">Parses a NetParameter loaded into memory from one of the other CreateNetwork*. <a href="#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">More...</a><br /></td></tr> |
| 167 | <tr class="separator:ab0bb4b8a290f1c8acd3c3a0d9a6e9783"><td class="memSeparator" colspan="2"> </td></tr> |
| 168 | <tr class="memitem:a9c5eed5d48d21a8b7e3bcd2cab519217"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c5eed5d48d21a8b7e3bcd2cab519217">LoadNetParam</a> (caffe::NetParameter &netParameter)</td></tr> |
| 169 | <tr class="memdesc:a9c5eed5d48d21a8b7e3bcd2cab519217"><td class="mdescLeft"> </td><td class="mdescRight">does the actual conversion from caffe::NetParameter to <a class="el" href="classarmnn_1_1_i_network.xhtml" title="Main network class which provides the interface for building up a neural network. ...">armnn::INetwork</a> <a href="#a9c5eed5d48d21a8b7e3bcd2cab519217">More...</a><br /></td></tr> |
| 170 | <tr class="separator:a9c5eed5d48d21a8b7e3bcd2cab519217"><td class="memSeparator" colspan="2"> </td></tr> |
| 171 | <tr class="memitem:a2f8fbd66c1a39a06d61fcb6536387d64"><td class="memItemLeft" align="right" valign="top">std::vector< const caffe::LayerParameter * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2f8fbd66c1a39a06d61fcb6536387d64">GetInputs</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 172 | <tr class="memdesc:a2f8fbd66c1a39a06d61fcb6536387d64"><td class="mdescLeft"> </td><td class="mdescRight">Find the Caffe layers listed as inputs (bottoms) for a given layer. <a href="#a2f8fbd66c1a39a06d61fcb6536387d64">More...</a><br /></td></tr> |
| 173 | <tr class="separator:a2f8fbd66c1a39a06d61fcb6536387d64"><td class="memSeparator" colspan="2"> </td></tr> |
| 174 | <tr class="memitem:a89631aa06b5c628c46674c202b40dbc5"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a89631aa06b5c628c46674c202b40dbc5">ResolveInPlaceLayers</a> (caffe::NetParameter &netParameter)</td></tr> |
| 175 | <tr class="memdesc:a89631aa06b5c628c46674c202b40dbc5"><td class="mdescLeft"> </td><td class="mdescRight">Modifies the Caffe network to replace "in-place" layers (whose top() and bottom() are both the same) with regular layers. <a href="#a89631aa06b5c628c46674c202b40dbc5">More...</a><br /></td></tr> |
| 176 | <tr class="separator:a89631aa06b5c628c46674c202b40dbc5"><td class="memSeparator" colspan="2"> </td></tr> |
| 177 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
| 178 | <tr class="memitem:a3a2636dd8414f2bb62c5fa097bdc9791"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a3a2636dd8414f2bb62c5fa097bdc9791">ParseInputLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 179 | <tr class="memdesc:a3a2636dd8414f2bb62c5fa097bdc9791"><td class="mdescLeft"> </td><td class="mdescRight">Adds an armnn layer to m_Network given a Caffe LayerParameter of the correct type and is responsible for recording any newly created IOutputSlots using <a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop()</a>. <a href="#a3a2636dd8414f2bb62c5fa097bdc9791">More...</a><br /></td></tr> |
| 180 | <tr class="separator:a3a2636dd8414f2bb62c5fa097bdc9791"><td class="memSeparator" colspan="2"> </td></tr> |
| 181 | <tr class="memitem:a5cddc80538d5de7d36192e0fd2d09c63"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5cddc80538d5de7d36192e0fd2d09c63">ParseConvLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 182 | <tr class="separator:a5cddc80538d5de7d36192e0fd2d09c63"><td class="memSeparator" colspan="2"> </td></tr> |
| 183 | <tr class="memitem:ab3329e4bcd8e42cd314f84c8260b06ad"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab3329e4bcd8e42cd314f84c8260b06ad">ParsePoolingLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 184 | <tr class="separator:ab3329e4bcd8e42cd314f84c8260b06ad"><td class="memSeparator" colspan="2"> </td></tr> |
| 185 | <tr class="memitem:a8449e66d395c0525561e3c67b100bafe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a8449e66d395c0525561e3c67b100bafe">ParseReluLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 186 | <tr class="separator:a8449e66d395c0525561e3c67b100bafe"><td class="memSeparator" colspan="2"> </td></tr> |
| 187 | <tr class="memitem:a7785119cfebd2b02ba3be888965e52ba"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a7785119cfebd2b02ba3be888965e52ba">ParseLRNLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 188 | <tr class="separator:a7785119cfebd2b02ba3be888965e52ba"><td class="memSeparator" colspan="2"> </td></tr> |
| 189 | <tr class="memitem:a34f6df4b84de1e269bcf02efeecc3892"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a34f6df4b84de1e269bcf02efeecc3892">ParseInnerProductLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 190 | <tr class="separator:a34f6df4b84de1e269bcf02efeecc3892"><td class="memSeparator" colspan="2"> </td></tr> |
| 191 | <tr class="memitem:a1c0594bf03dfbb44029465d3466127b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1c0594bf03dfbb44029465d3466127b3">ParseSoftmaxLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 192 | <tr class="separator:a1c0594bf03dfbb44029465d3466127b3"><td class="memSeparator" colspan="2"> </td></tr> |
| 193 | <tr class="memitem:a99a846a21b3a6ec97cc1d4344b91df36"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a99a846a21b3a6ec97cc1d4344b91df36">ParseEltwiseLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 194 | <tr class="separator:a99a846a21b3a6ec97cc1d4344b91df36"><td class="memSeparator" colspan="2"> </td></tr> |
| 195 | <tr class="memitem:aa0f0ff1cae05c1a0d7cc11b498714312"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aa0f0ff1cae05c1a0d7cc11b498714312">ParseConcatLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 196 | <tr class="separator:aa0f0ff1cae05c1a0d7cc11b498714312"><td class="memSeparator" colspan="2"> </td></tr> |
| 197 | <tr class="memitem:a940483591995bb812cfcd1595dba83c3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a940483591995bb812cfcd1595dba83c3">ParseBatchNormLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 198 | <tr class="separator:a940483591995bb812cfcd1595dba83c3"><td class="memSeparator" colspan="2"> </td></tr> |
| 199 | <tr class="memitem:a95799625a4aae0ed73838cbfa3530c1b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a95799625a4aae0ed73838cbfa3530c1b">ParseScaleLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 200 | <tr class="separator:a95799625a4aae0ed73838cbfa3530c1b"><td class="memSeparator" colspan="2"> </td></tr> |
| 201 | <tr class="memitem:a3311e9dc3436fe83ef22c5f530fd3234"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a3311e9dc3436fe83ef22c5f530fd3234">ParseSplitLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 202 | <tr class="separator:a3311e9dc3436fe83ef22c5f530fd3234"><td class="memSeparator" colspan="2"> </td></tr> |
| 203 | <tr class="memitem:aa4c22681675806fa2c5fbf403d49c628"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aa4c22681675806fa2c5fbf403d49c628">ParseDropoutLayer</a> (const caffe::LayerParameter &layerParam)</td></tr> |
| 204 | <tr class="separator:aa4c22681675806fa2c5fbf403d49c628"><td class="memSeparator" colspan="2"> </td></tr> |
| 205 | <tr><td colspan="2"><div class="groupHeader"></div></td></tr> |
| 206 | <tr class="memitem:a9fea304829fe514d664de515ca5c3918"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9fea304829fe514d664de515ca5c3918">AddConvLayerWithSplits</a> (const caffe::LayerParameter &layerParam, const <a class="el" href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a> &desc, unsigned int kernelW, unsigned int kernelH)</td></tr> |
| 207 | <tr class="memdesc:a9fea304829fe514d664de515ca5c3918"><td class="mdescLeft"> </td><td class="mdescRight">ParseConv may use these helpers depending on the group parameter. <a href="#a9fea304829fe514d664de515ca5c3918">More...</a><br /></td></tr> |
| 208 | <tr class="separator:a9fea304829fe514d664de515ca5c3918"><td class="memSeparator" colspan="2"> </td></tr> |
| 209 | <tr class="memitem:adcb87456482d5df17ef09eca1a808091"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#adcb87456482d5df17ef09eca1a808091">AddConvLayerWithDepthwiseConv</a> (const caffe::LayerParameter &layerParam, const <a class="el" href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a> &desc, unsigned int kernelW, unsigned int kernelH)</td></tr> |
| 210 | <tr class="separator:adcb87456482d5df17ef09eca1a808091"><td class="memSeparator" colspan="2"> </td></tr> |
| 211 | <tr class="inherit_header pro_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td colspan="2" onclick="javascript:toggleInherit('pro_methods_classarmnn_caffe_parser_1_1_i_caffe_parser')"><img src="closed.png" alt="-"/> Protected Member Functions inherited from <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml">ICaffeParser</a></td></tr> |
| 212 | <tr class="memitem:ac4414ec3d86bc919088a47ef300b4532 inherit pro_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#ac4414ec3d86bc919088a47ef300b4532">~ICaffeParser</a> ()</td></tr> |
| 213 | <tr class="separator:ac4414ec3d86bc919088a47ef300b4532 inherit pro_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memSeparator" colspan="2"> </td></tr> |
| 214 | </table><table class="memberdecls"> |
| 215 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-methods"></a> |
| 216 | Static Protected Member Functions</h2></td></tr> |
| 217 | <tr class="memitem:a5f5e6255b21fdf458d3733bbdcdc4af5"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5f5e6255b21fdf458d3733bbdcdc4af5">TrackBindingPoint</a> (<a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> *layer, <a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> id, const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> &tensorInfo, const char *bindingPointDesc, std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > &nameToBindingInfo)</td></tr> |
| 218 | <tr class="separator:a5f5e6255b21fdf458d3733bbdcdc4af5"><td class="memSeparator" colspan="2"> </td></tr> |
| 219 | <tr class="memitem:afb7e4da478bab76261963479baad5788"><td class="memItemLeft" align="right" valign="top">static std::pair< <a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a>, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#afb7e4da478bab76261963479baad5788">GetBindingInfo</a> (const std::string &layerName, const char *bindingPointDesc, const std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > &bindingInfos)</td></tr> |
| 220 | <tr class="separator:afb7e4da478bab76261963479baad5788"><td class="memSeparator" colspan="2"> </td></tr> |
| 221 | </table><table class="memberdecls"> |
| 222 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a> |
| 223 | Protected Attributes</h2></td></tr> |
| 224 | <tr class="memitem:ac62e2558c14e01605f2b4e1e21cdd1e8"><td class="memItemLeft" align="right" valign="top">std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">m_NetworkInputsBindingInfo</a></td></tr> |
| 225 | <tr class="memdesc:ac62e2558c14e01605f2b4e1e21cdd1e8"><td class="mdescLeft"> </td><td class="mdescRight">maps input layer names to their corresponding ids and tensor infos <a href="#ac62e2558c14e01605f2b4e1e21cdd1e8">More...</a><br /></td></tr> |
| 226 | <tr class="separator:ac62e2558c14e01605f2b4e1e21cdd1e8"><td class="memSeparator" colspan="2"> </td></tr> |
| 227 | <tr class="memitem:a62d6d6cba9ed0d3ad63fffb40aec86b5"><td class="memItemLeft" align="right" valign="top">std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">m_NetworkOutputsBindingInfo</a></td></tr> |
| 228 | <tr class="memdesc:a62d6d6cba9ed0d3ad63fffb40aec86b5"><td class="mdescLeft"> </td><td class="mdescRight">maps output layer names to their corresponding ids and tensor infos <a href="#a62d6d6cba9ed0d3ad63fffb40aec86b5">More...</a><br /></td></tr> |
| 229 | <tr class="separator:a62d6d6cba9ed0d3ad63fffb40aec86b5"><td class="memSeparator" colspan="2"> </td></tr> |
| 230 | <tr class="memitem:a2db3ae8d422f17d455e0ba0cb6291d2a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a></td></tr> |
| 231 | <tr class="separator:a2db3ae8d422f17d455e0ba0cb6291d2a"><td class="memSeparator" colspan="2"> </td></tr> |
| 232 | <tr class="memitem:a76ea67f3f7d1d5835c5a92b65dc0854c"><td class="memItemLeft" align="right" valign="top">std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">m_InputShapes</a></td></tr> |
| 233 | <tr class="separator:a76ea67f3f7d1d5835c5a92b65dc0854c"><td class="memSeparator" colspan="2"> </td></tr> |
| 234 | <tr class="memitem:a9c99d40a72e6f0c6e4ad92d21e44edca"><td class="memItemLeft" align="right" valign="top">std::unordered_map< std::string, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a> * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a></td></tr> |
| 235 | <tr class="memdesc:a9c99d40a72e6f0c6e4ad92d21e44edca"><td class="mdescLeft"> </td><td class="mdescRight">As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops. <a href="#a9c99d40a72e6f0c6e4ad92d21e44edca">More...</a><br /></td></tr> |
| 236 | <tr class="separator:a9c99d40a72e6f0c6e4ad92d21e44edca"><td class="memSeparator" colspan="2"> </td></tr> |
| 237 | <tr class="memitem:a86cb41745deebd9b0ccf157d97d4d9ca"><td class="memItemLeft" align="right" valign="top">std::vector< std::string > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">m_RequestedOutputs</a></td></tr> |
| 238 | <tr class="separator:a86cb41745deebd9b0ccf157d97d4d9ca"><td class="memSeparator" colspan="2"> </td></tr> |
| 239 | <tr class="memitem:a1424f1bfbfc81d317b51053bbb315ef1"><td class="memItemLeft" align="right" valign="top">std::map< std::string, const caffe::LayerParameter * > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a></td></tr> |
| 240 | <tr class="separator:a1424f1bfbfc81d317b51053bbb315ef1"><td class="memSeparator" colspan="2"> </td></tr> |
| 241 | </table><table class="memberdecls"> |
| 242 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-static-attribs"></a> |
| 243 | Static Protected Attributes</h2></td></tr> |
| 244 | <tr class="memitem:a25a42793445e13200fae0040d7c7d993"><td class="memItemLeft" align="right" valign="top">static const std::map< std::string, <a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a92e74211c7da4501270bc01a6acef64c">OperationParsingFunction</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a25a42793445e13200fae0040d7c7d993">ms_CaffeLayerNameToParsingFunctions</a></td></tr> |
| 245 | <tr class="memdesc:a25a42793445e13200fae0040d7c7d993"><td class="mdescLeft"> </td><td class="mdescRight">Maps Caffe layer names to parsing member functions. <a href="#a25a42793445e13200fae0040d7c7d993">More...</a><br /></td></tr> |
| 246 | <tr class="separator:a25a42793445e13200fae0040d7c7d993"><td class="memSeparator" colspan="2"> </td></tr> |
| 247 | </table><table class="memberdecls"> |
| 248 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a> |
| 249 | Additional Inherited Members</h2></td></tr> |
| 250 | <tr class="inherit_header pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td colspan="2" onclick="javascript:toggleInherit('pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser')"><img src="closed.png" alt="-"/> Static Public Member Functions inherited from <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml">ICaffeParser</a></td></tr> |
| 251 | <tr class="memitem:a706b8481b6bd660dd3c3898fdf7a2993 inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml">ICaffeParser</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a706b8481b6bd660dd3c3898fdf7a2993">CreateRaw</a> ()</td></tr> |
| 252 | <tr class="separator:a706b8481b6bd660dd3c3898fdf7a2993 inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memSeparator" colspan="2"> </td></tr> |
| 253 | <tr class="memitem:abd42446e41480b0cc9df7ce06af412e3 inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacearmnn_caffe_parser.xhtml#a33c76910f1980ffaa41c22e0151cce2a">ICaffeParserPtr</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#abd42446e41480b0cc9df7ce06af412e3">Create</a> ()</td></tr> |
| 254 | <tr class="separator:abd42446e41480b0cc9df7ce06af412e3 inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memSeparator" colspan="2"> </td></tr> |
| 255 | <tr class="memitem:a5e8137c09390352d2f8b420d147d3b2e inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memItemLeft" align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a5e8137c09390352d2f8b420d147d3b2e">Destroy</a> (<a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml">ICaffeParser</a> *parser)</td></tr> |
| 256 | <tr class="separator:a5e8137c09390352d2f8b420d147d3b2e inherit pub_static_methods_classarmnn_caffe_parser_1_1_i_caffe_parser"><td class="memSeparator" colspan="2"> </td></tr> |
| 257 | </table> |
| 258 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 259 | <div class="textblock"> |
| 260 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00026">26</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 261 | </div><h2 class="groupheader">Member Typedef Documentation</h2> |
| 262 | <a id="a92e74211c7da4501270bc01a6acef64c"></a> |
| 263 | <h2 class="memtitle"><span class="permalink"><a href="#a92e74211c7da4501270bc01a6acef64c">◆ </a></span>OperationParsingFunction</h2> |
| 264 | |
| 265 | <div class="memitem"> |
| 266 | <div class="memproto"> |
| 267 | <table class="mlabels"> |
| 268 | <tr> |
| 269 | <td class="mlabels-left"> |
| 270 | <table class="memname"> |
| 271 | <tr> |
| 272 | <td class="memname">using <a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a92e74211c7da4501270bc01a6acef64c">OperationParsingFunction</a> = void(CaffeParserBase::*)(const caffe::LayerParameter& layerParam)</td> |
| 273 | </tr> |
| 274 | </table> |
| 275 | </td> |
| 276 | <td class="mlabels-right"> |
| 277 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 278 | </tr> |
| 279 | </table> |
| 280 | </div><div class="memdoc"> |
| 281 | |
| 282 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00115">115</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 283 | |
| 284 | </div> |
| 285 | </div> |
| 286 | <h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 287 | <a id="a75b607432cb087d384e2424aa782af89"></a> |
| 288 | <h2 class="memtitle"><span class="permalink"><a href="#a75b607432cb087d384e2424aa782af89">◆ </a></span>CaffeParserBase()</h2> |
| 289 | |
| 290 | <div class="memitem"> |
| 291 | <div class="memproto"> |
| 292 | <table class="memname"> |
| 293 | <tr> |
| 294 | <td class="memname"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml">CaffeParserBase</a> </td> |
| 295 | <td>(</td> |
| 296 | <td class="paramname"></td><td>)</td> |
| 297 | <td></td> |
| 298 | </tr> |
| 299 | </table> |
| 300 | </div><div class="memdoc"> |
| 301 | |
| 302 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00274">274</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 303 | <div class="fragment"><div class="line"><a name="l00275"></a><span class="lineno"> 275</span>  : <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>(<span class="keyword">nullptr</span>, <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00276"></a><span class="lineno"> 276</span> {</div><div class="line"><a name="l00277"></a><span class="lineno"> 277</span> </div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 304 | </div><!-- fragment --> |
| 305 | </div> |
| 306 | </div> |
| 307 | <h2 class="groupheader">Member Function Documentation</h2> |
| 308 | <a id="adcb87456482d5df17ef09eca1a808091"></a> |
| 309 | <h2 class="memtitle"><span class="permalink"><a href="#adcb87456482d5df17ef09eca1a808091">◆ </a></span>AddConvLayerWithDepthwiseConv()</h2> |
| 310 | |
| 311 | <div class="memitem"> |
| 312 | <div class="memproto"> |
| 313 | <table class="mlabels"> |
| 314 | <tr> |
| 315 | <td class="mlabels-left"> |
| 316 | <table class="memname"> |
| 317 | <tr> |
| 318 | <td class="memname">void AddConvLayerWithDepthwiseConv </td> |
| 319 | <td>(</td> |
| 320 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 321 | <td class="paramname"><em>layerParam</em>, </td> |
| 322 | </tr> |
| 323 | <tr> |
| 324 | <td class="paramkey"></td> |
| 325 | <td></td> |
| 326 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a> & </td> |
| 327 | <td class="paramname"><em>desc</em>, </td> |
| 328 | </tr> |
| 329 | <tr> |
| 330 | <td class="paramkey"></td> |
| 331 | <td></td> |
| 332 | <td class="paramtype">unsigned int </td> |
| 333 | <td class="paramname"><em>kernelW</em>, </td> |
| 334 | </tr> |
| 335 | <tr> |
| 336 | <td class="paramkey"></td> |
| 337 | <td></td> |
| 338 | <td class="paramtype">unsigned int </td> |
| 339 | <td class="paramname"><em>kernelH</em> </td> |
| 340 | </tr> |
| 341 | <tr> |
| 342 | <td></td> |
| 343 | <td>)</td> |
| 344 | <td></td><td></td> |
| 345 | </tr> |
| 346 | </table> |
| 347 | </td> |
| 348 | <td class="mlabels-right"> |
| 349 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 350 | </tr> |
| 351 | </table> |
| 352 | </div><div class="memdoc"> |
| 353 | |
| 354 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">611</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 355 | |
| 356 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParserBase::BlobShapeToTensorInfo()</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00438">Convolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00428">Convolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00422">Convolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00474">DepthwiseConvolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00424">Convolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00426">Convolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00430">Convolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00432">Convolution2dDescriptor::m_StrideY</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00325">armnnCaffeParser::TensorDescToBlobShape()</a>.</p> |
| 357 | |
| 358 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>.</p> |
| 359 | <div class="fragment"><div class="line"><a name="l00615"></a><span class="lineno"> 615</span> {</div><div class="line"><a name="l00616"></a><span class="lineno"> 616</span>  BOOST_ASSERT(layerParam.type() == <span class="stringliteral">"Convolution"</span>);</div><div class="line"><a name="l00617"></a><span class="lineno"> 617</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l00618"></a><span class="lineno"> 618</span> </div><div class="line"><a name="l00619"></a><span class="lineno"> 619</span>  ConvolutionParameter convParam = layerParam.convolution_param();</div><div class="line"><a name="l00620"></a><span class="lineno"> 620</span>  BlobShape inputShape = <a class="code" href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">TensorDescToBlobShape</a>(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>());</div><div class="line"><a name="l00621"></a><span class="lineno"> 621</span> </div><div class="line"><a name="l00622"></a><span class="lineno"> 622</span>  <a class="code" href="structarmnn_1_1_depthwise_convolution2d_descriptor.xhtml">DepthwiseConvolution2dDescriptor</a> desc;</div><div class="line"><a name="l00623"></a><span class="lineno"> 623</span>  desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">m_PadLeft</a> = convDesc.m_PadLeft;</div><div class="line"><a name="l00624"></a><span class="lineno"> 624</span>  desc.m_PadRight = convDesc.m_PadRight;</div><div class="line"><a name="l00625"></a><span class="lineno"> 625</span>  desc.m_PadTop = convDesc.m_PadTop;</div><div class="line"><a name="l00626"></a><span class="lineno"> 626</span>  desc.m_PadBottom = convDesc.m_PadBottom;</div><div class="line"><a name="l00627"></a><span class="lineno"> 627</span>  desc.m_StrideX = convDesc.m_StrideX;</div><div class="line"><a name="l00628"></a><span class="lineno"> 628</span>  desc.m_StrideY = convDesc.m_StrideY;</div><div class="line"><a name="l00629"></a><span class="lineno"> 629</span>  desc.m_BiasEnabled = convDesc.m_BiasEnabled;</div><div class="line"><a name="l00630"></a><span class="lineno"> 630</span> </div><div class="line"><a name="l00631"></a><span class="lineno"> 631</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numFilters = convParam.num_output();</div><div class="line"><a name="l00632"></a><span class="lineno"> 632</span> </div><div class="line"><a name="l00633"></a><span class="lineno"> 633</span>  BlobShape outputShape;</div><div class="line"><a name="l00634"></a><span class="lineno"> 634</span>  outputShape.add_dim(0);</div><div class="line"><a name="l00635"></a><span class="lineno"> 635</span>  outputShape.set_dim(0, inputShape.dim(0));</div><div class="line"><a name="l00636"></a><span class="lineno"> 636</span>  outputShape.add_dim(1);</div><div class="line"><a name="l00637"></a><span class="lineno"> 637</span>  outputShape.set_dim(1, numFilters);</div><div class="line"><a name="l00638"></a><span class="lineno"> 638</span>  outputShape.add_dim(2);</div><div class="line"><a name="l00639"></a><span class="lineno"> 639</span>  outputShape.set_dim(</div><div class="line"><a name="l00640"></a><span class="lineno"> 640</span>  2, (static_cast<int>(</div><div class="line"><a name="l00641"></a><span class="lineno"> 641</span>  static_cast<float>(inputShape.dim(2) + 2 * desc.m_PadBottom - kernelH) /</div><div class="line"><a name="l00642"></a><span class="lineno"> 642</span>  static_cast<float>(desc.m_StrideY)) + 1));</div><div class="line"><a name="l00643"></a><span class="lineno"> 643</span>  outputShape.add_dim(3);</div><div class="line"><a name="l00644"></a><span class="lineno"> 644</span>  outputShape.set_dim(</div><div class="line"><a name="l00645"></a><span class="lineno"> 645</span>  3, (static_cast<int>(</div><div class="line"><a name="l00646"></a><span class="lineno"> 646</span>  static_cast<float>(inputShape.dim(3) + 2 * desc.m_PadRight - kernelW) /</div><div class="line"><a name="l00647"></a><span class="lineno"> 647</span>  static_cast<float>(desc.m_StrideX)) + 1));</div><div class="line"><a name="l00648"></a><span class="lineno"> 648</span> </div><div class="line"><a name="l00649"></a><span class="lineno"> 649</span>  <span class="comment">// Load the weight data</span></div><div class="line"><a name="l00650"></a><span class="lineno"> 650</span>  <span class="keywordtype">size_t</span> allWeightsSize = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">size_t</span>>(inputShape.dim(1) * kernelH * kernelW);</div><div class="line"><a name="l00651"></a><span class="lineno"> 651</span>  vector<float> weightData(allWeightsSize);</div><div class="line"><a name="l00652"></a><span class="lineno"> 652</span> </div><div class="line"><a name="l00653"></a><span class="lineno"> 653</span>  GetDataFromBlob(layerParam, weightData, 0);</div><div class="line"><a name="l00654"></a><span class="lineno"> 654</span> </div><div class="line"><a name="l00655"></a><span class="lineno"> 655</span>  <span class="comment">// depth multiplier will be 1 for the depthwise convolution</span></div><div class="line"><a name="l00656"></a><span class="lineno"> 656</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weightDimSizes[4] = {</div><div class="line"><a name="l00657"></a><span class="lineno"> 657</span>  <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(1), <span class="comment">// depth multiplier</span></div><div class="line"><a name="l00658"></a><span class="lineno"> 658</span>  static_cast<unsigned int>(inputShape.dim(1)), <span class="comment">// #channels</span></div><div class="line"><a name="l00659"></a><span class="lineno"> 659</span>  kernelH,</div><div class="line"><a name="l00660"></a><span class="lineno"> 660</span>  kernelW};</div><div class="line"><a name="l00661"></a><span class="lineno"> 661</span> </div><div class="line"><a name="l00662"></a><span class="lineno"> 662</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* returnLayer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00663"></a><span class="lineno"> 663</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> weights(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(4, weightDimSizes, DataType::Float32), weightData.data());</div><div class="line"><a name="l00664"></a><span class="lineno"> 664</span>  <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a> optionalBiases;</div><div class="line"><a name="l00665"></a><span class="lineno"> 665</span>  vector<float> biasData;</div><div class="line"><a name="l00666"></a><span class="lineno"> 666</span>  <span class="keywordflow">if</span> (desc.m_BiasEnabled)</div><div class="line"><a name="l00667"></a><span class="lineno"> 667</span>  {</div><div class="line"><a name="l00668"></a><span class="lineno"> 668</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> biasInfo;</div><div class="line"><a name="l00669"></a><span class="lineno"> 669</span> </div><div class="line"><a name="l00670"></a><span class="lineno"> 670</span>  biasData.resize(boost::numeric_cast<size_t>(outputShape.dim(1)), 1.f);</div><div class="line"><a name="l00671"></a><span class="lineno"> 671</span>  GetDataFromBlob(layerParam, biasData, 1);</div><div class="line"><a name="l00672"></a><span class="lineno"> 672</span> </div><div class="line"><a name="l00673"></a><span class="lineno"> 673</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> biasDimSizes[1] = {<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(1))};</div><div class="line"><a name="l00674"></a><span class="lineno"> 674</span>  biasInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, biasDimSizes, DataType::Float32);</div><div class="line"><a name="l00675"></a><span class="lineno"> 675</span> </div><div class="line"><a name="l00676"></a><span class="lineno"> 676</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> biases(biasInfo, biasData.data());</div><div class="line"><a name="l00677"></a><span class="lineno"> 677</span>  optionalBiases = <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a>(biases);</div><div class="line"><a name="l00678"></a><span class="lineno"> 678</span>  }</div><div class="line"><a name="l00679"></a><span class="lineno"> 679</span>  returnLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddDepthwiseConvolution2dLayer(desc,</div><div class="line"><a name="l00680"></a><span class="lineno"> 680</span>  weights,</div><div class="line"><a name="l00681"></a><span class="lineno"> 681</span>  optionalBiases,</div><div class="line"><a name="l00682"></a><span class="lineno"> 682</span>  layerParam.name().c_str());</div><div class="line"><a name="l00683"></a><span class="lineno"> 683</span> </div><div class="line"><a name="l00684"></a><span class="lineno"> 684</span>  <span class="keywordflow">if</span> (!returnLayer)</div><div class="line"><a name="l00685"></a><span class="lineno"> 685</span>  {</div><div class="line"><a name="l00686"></a><span class="lineno"> 686</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00687"></a><span class="lineno"> 687</span>  boost::str(</div><div class="line"><a name="l00688"></a><span class="lineno"> 688</span>  boost::format(</div><div class="line"><a name="l00689"></a><span class="lineno"> 689</span>  <span class="stringliteral">"Failed to create depthwise convolution layer. "</span></div><div class="line"><a name="l00690"></a><span class="lineno"> 690</span>  <span class="stringliteral">"Layer=%1% #filters=%2% %3%"</span>) %</div><div class="line"><a name="l00691"></a><span class="lineno"> 691</span>  layerParam.name() %</div><div class="line"><a name="l00692"></a><span class="lineno"> 692</span>  numFilters %</div><div class="line"><a name="l00693"></a><span class="lineno"> 693</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00694"></a><span class="lineno"> 694</span>  }</div><div class="line"><a name="l00695"></a><span class="lineno"> 695</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& inputConnection = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0));</div><div class="line"><a name="l00696"></a><span class="lineno"> 696</span>  inputConnection.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(returnLayer->GetInputSlot(0));</div><div class="line"><a name="l00697"></a><span class="lineno"> 697</span>  returnLayer->GetOutputSlot(0).SetTensorInfo(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a>(outputShape));</div><div class="line"><a name="l00698"></a><span class="lineno"> 698</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), returnLayer->GetOutputSlot(0));</div><div class="line"><a name="l00699"></a><span class="lineno"> 699</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 360 | <div class="ttc" id="classarmnn_1_1_optional_xhtml"><div class="ttname"><a href="classarmnn_1_1_optional.xhtml">armnn::Optional</a></div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00270">Optional.hpp:270</a></div></div> |
| 361 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 362 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 363 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 364 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 365 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 366 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a77e6c08b48c99fafa560805270503856"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">armnnCaffeParser::CaffeParserBase::BlobShapeToTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo BlobShapeToTensorInfo(const caffe::BlobShape &blobShape) const</div><div class="ttdoc">Converts Caffe&#39;s protobuf tensor shape format to ArmNN&#39;s. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParser.cpp:314</a></div></div> |
| 367 | <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> |
| 368 | <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> |
| 369 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 370 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 371 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 372 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 373 | <div class="ttc" id="structarmnn_1_1_depthwise_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_depthwise_convolution2d_descriptor.xhtml">armnn::DepthwiseConvolution2dDescriptor</a></div><div class="ttdoc">A DepthwiseConvolution2dDescriptor for the DepthwiseConvolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00444">Descriptors.hpp:444</a></div></div> |
| 374 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_ac18546ebbebbb32fe0a03baa9bf2c600"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">armnn::Convolution2dDescriptor::m_PadLeft</a></div><div class="ttdeci">uint32_t m_PadLeft</div><div class="ttdoc">Padding left value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00422">Descriptors.hpp:422</a></div></div> |
| 375 | <div class="ttc" id="namespacearmnn_caffe_parser_xhtml_af3fde7630e7c9df35cae9ed2b435dbed"><div class="ttname"><a href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">armnnCaffeParser::TensorDescToBlobShape</a></div><div class="ttdeci">BlobShape TensorDescToBlobShape(const TensorInfo &desc)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00325">CaffeParser.cpp:325</a></div></div> |
| 376 | </div><!-- fragment --> |
| 377 | </div> |
| 378 | </div> |
| 379 | <a id="a9fea304829fe514d664de515ca5c3918"></a> |
| 380 | <h2 class="memtitle"><span class="permalink"><a href="#a9fea304829fe514d664de515ca5c3918">◆ </a></span>AddConvLayerWithSplits()</h2> |
| 381 | |
| 382 | <div class="memitem"> |
| 383 | <div class="memproto"> |
| 384 | <table class="mlabels"> |
| 385 | <tr> |
| 386 | <td class="mlabels-left"> |
| 387 | <table class="memname"> |
| 388 | <tr> |
| 389 | <td class="memname">void AddConvLayerWithSplits </td> |
| 390 | <td>(</td> |
| 391 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 392 | <td class="paramname"><em>layerParam</em>, </td> |
| 393 | </tr> |
| 394 | <tr> |
| 395 | <td class="paramkey"></td> |
| 396 | <td></td> |
| 397 | <td class="paramtype">const <a class="el" href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a> & </td> |
| 398 | <td class="paramname"><em>desc</em>, </td> |
| 399 | </tr> |
| 400 | <tr> |
| 401 | <td class="paramkey"></td> |
| 402 | <td></td> |
| 403 | <td class="paramtype">unsigned int </td> |
| 404 | <td class="paramname"><em>kernelW</em>, </td> |
| 405 | </tr> |
| 406 | <tr> |
| 407 | <td class="paramkey"></td> |
| 408 | <td></td> |
| 409 | <td class="paramtype">unsigned int </td> |
| 410 | <td class="paramname"><em>kernelH</em> </td> |
| 411 | </tr> |
| 412 | <tr> |
| 413 | <td></td> |
| 414 | <td>)</td> |
| 415 | <td></td><td></td> |
| 416 | </tr> |
| 417 | </table> |
| 418 | </td> |
| 419 | <td class="mlabels-right"> |
| 420 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 421 | </tr> |
| 422 | </table> |
| 423 | </div><div class="memdoc"> |
| 424 | |
| 425 | <p>ParseConv may use these helpers depending on the group parameter. </p> |
| 426 | |
| 427 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">419</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 428 | |
| 429 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParserBase::BlobShapeToTensorInfo()</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#ac2dac3b61c94de52093616be4ab17f8d">IConnectableLayer::GetNumOutputSlots()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00438">Convolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00428">Convolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00424">Convolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00430">Convolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00432">Convolution2dDescriptor::m_StrideY</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00159">OriginsDescriptor::SetViewOriginCoord()</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00302">ViewsDescriptor::SetViewOriginCoord()</a>, <a class="el" href="_descriptors_8cpp_source.xhtml#l00307">ViewsDescriptor::SetViewSize()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00325">armnnCaffeParser::TensorDescToBlobShape()</a>.</p> |
| 430 | |
| 431 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>.</p> |
| 432 | <div class="fragment"><div class="line"><a name="l00423"></a><span class="lineno"> 423</span> {</div><div class="line"><a name="l00424"></a><span class="lineno"> 424</span>  BOOST_ASSERT(layerParam.type() == <span class="stringliteral">"Convolution"</span>);</div><div class="line"><a name="l00425"></a><span class="lineno"> 425</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l00426"></a><span class="lineno"> 426</span> </div><div class="line"><a name="l00427"></a><span class="lineno"> 427</span>  ConvolutionParameter convParam = layerParam.convolution_param();</div><div class="line"><a name="l00428"></a><span class="lineno"> 428</span>  BlobShape inputShape = <a class="code" href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">TensorDescToBlobShape</a>(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>());</div><div class="line"><a name="l00429"></a><span class="lineno"> 429</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numGroups = convParam.has_group() ? convParam.group() : 1;</div><div class="line"><a name="l00430"></a><span class="lineno"> 430</span> </div><div class="line"><a name="l00431"></a><span class="lineno"> 431</span>  <span class="comment">// asusme these were already verified by the caller ParseConvLayer() function</span></div><div class="line"><a name="l00432"></a><span class="lineno"> 432</span>  BOOST_ASSERT(numGroups < inputShape.dim(1));</div><div class="line"><a name="l00433"></a><span class="lineno"> 433</span>  BOOST_ASSERT(numGroups > 1);</div><div class="line"><a name="l00434"></a><span class="lineno"> 434</span> </div><div class="line"><a name="l00435"></a><span class="lineno"> 435</span>  <span class="comment">// Handle grouping</span></div><div class="line"><a name="l00436"></a><span class="lineno"> 436</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& inputConnection = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0));</div><div class="line"><a name="l00437"></a><span class="lineno"> 437</span> </div><div class="line"><a name="l00438"></a><span class="lineno"> 438</span>  vector<string> convLayerNames(numGroups);</div><div class="line"><a name="l00439"></a><span class="lineno"> 439</span>  vector<armnn::IConnectableLayer*> convLayers(numGroups);</div><div class="line"><a name="l00440"></a><span class="lineno"> 440</span>  convLayerNames[0] = layerParam.name();</div><div class="line"><a name="l00441"></a><span class="lineno"> 441</span> </div><div class="line"><a name="l00442"></a><span class="lineno"> 442</span>  <span class="comment">// This convolution is to be applied to chunks of the input data so add a splitter layer</span></div><div class="line"><a name="l00443"></a><span class="lineno"> 443</span> </div><div class="line"><a name="l00444"></a><span class="lineno"> 444</span>  <span class="comment">// Redirect the convolution input to the splitter</span></div><div class="line"><a name="l00445"></a><span class="lineno"> 445</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> splitterDimSizes[4] = {<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(inputShape.dim(0)),</div><div class="line"><a name="l00446"></a><span class="lineno"> 446</span>  static_cast<unsigned int>(inputShape.dim(1)),</div><div class="line"><a name="l00447"></a><span class="lineno"> 447</span>  static_cast<unsigned int>(inputShape.dim(2)),</div><div class="line"><a name="l00448"></a><span class="lineno"> 448</span>  static_cast<unsigned int>(inputShape.dim(3))};</div><div class="line"><a name="l00449"></a><span class="lineno"> 449</span> </div><div class="line"><a name="l00450"></a><span class="lineno"> 450</span>  <span class="comment">// Split dimension 1 of the splitter output shape and conv input shapes</span></div><div class="line"><a name="l00451"></a><span class="lineno"> 451</span>  <span class="comment">// according to the number of groups</span></div><div class="line"><a name="l00452"></a><span class="lineno"> 452</span> </div><div class="line"><a name="l00453"></a><span class="lineno"> 453</span>  splitterDimSizes[1] /= numGroups;</div><div class="line"><a name="l00454"></a><span class="lineno"> 454</span>  inputShape.set_dim(1, splitterDimSizes[1]);</div><div class="line"><a name="l00455"></a><span class="lineno"> 455</span> </div><div class="line"><a name="l00456"></a><span class="lineno"> 456</span>  <span class="comment">// This is used to describe how the input is to be split</span></div><div class="line"><a name="l00457"></a><span class="lineno"> 457</span>  <a class="code" href="structarmnn_1_1_views_descriptor.xhtml">ViewsDescriptor</a> splitterDesc(numGroups);</div><div class="line"><a name="l00458"></a><span class="lineno"> 458</span> </div><div class="line"><a name="l00459"></a><span class="lineno"> 459</span>  <span class="comment">// Create an output node for each group, giving each a unique name</span></div><div class="line"><a name="l00460"></a><span class="lineno"> 460</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> g = 0; g < numGroups; ++g)</div><div class="line"><a name="l00461"></a><span class="lineno"> 461</span>  {</div><div class="line"><a name="l00462"></a><span class="lineno"> 462</span>  <span class="comment">// Work out the names of the splitter layers child convolutions</span></div><div class="line"><a name="l00463"></a><span class="lineno"> 463</span>  stringstream ss;</div><div class="line"><a name="l00464"></a><span class="lineno"> 464</span>  ss << layerParam.name() << <span class="stringliteral">"_"</span> << g;</div><div class="line"><a name="l00465"></a><span class="lineno"> 465</span>  convLayerNames[g] = ss.str();</div><div class="line"><a name="l00466"></a><span class="lineno"> 466</span> </div><div class="line"><a name="l00467"></a><span class="lineno"> 467</span>  splitterDesc.SetViewOriginCoord(g, 1, splitterDimSizes[1] * g);</div><div class="line"><a name="l00468"></a><span class="lineno"> 468</span> </div><div class="line"><a name="l00469"></a><span class="lineno"> 469</span>  <span class="comment">// Set the size of the views.</span></div><div class="line"><a name="l00470"></a><span class="lineno"> 470</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> dimIdx=0; dimIdx < 4; dimIdx++)</div><div class="line"><a name="l00471"></a><span class="lineno"> 471</span>  {</div><div class="line"><a name="l00472"></a><span class="lineno"> 472</span>  splitterDesc.SetViewSize(g, dimIdx, splitterDimSizes[dimIdx]);</div><div class="line"><a name="l00473"></a><span class="lineno"> 473</span>  }</div><div class="line"><a name="l00474"></a><span class="lineno"> 474</span>  }</div><div class="line"><a name="l00475"></a><span class="lineno"> 475</span> </div><div class="line"><a name="l00476"></a><span class="lineno"> 476</span>  <span class="keyword">const</span> std::string splitterLayerName = std::string(<span class="stringliteral">"splitter_"</span>) + layerParam.bottom(0);</div><div class="line"><a name="l00477"></a><span class="lineno"> 477</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* splitterLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddSplitterLayer(splitterDesc, splitterLayerName.c_str());</div><div class="line"><a name="l00478"></a><span class="lineno"> 478</span> </div><div class="line"><a name="l00479"></a><span class="lineno"> 479</span>  inputConnection.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(splitterLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l00480"></a><span class="lineno"> 480</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < splitterLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#ac2dac3b61c94de52093616be4ab17f8d">GetNumOutputSlots</a>(); i++)</div><div class="line"><a name="l00481"></a><span class="lineno"> 481</span>  {</div><div class="line"><a name="l00482"></a><span class="lineno"> 482</span>  splitterLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(i).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a>(inputShape));</div><div class="line"><a name="l00483"></a><span class="lineno"> 483</span>  }</div><div class="line"><a name="l00484"></a><span class="lineno"> 484</span> </div><div class="line"><a name="l00485"></a><span class="lineno"> 485</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numFilters = convParam.num_output();</div><div class="line"><a name="l00486"></a><span class="lineno"> 486</span> </div><div class="line"><a name="l00487"></a><span class="lineno"> 487</span>  <span class="comment">// Populates convolution output tensor descriptor dimensions.</span></div><div class="line"><a name="l00488"></a><span class="lineno"> 488</span>  BlobShape outputShape;</div><div class="line"><a name="l00489"></a><span class="lineno"> 489</span>  outputShape.add_dim(0);</div><div class="line"><a name="l00490"></a><span class="lineno"> 490</span>  outputShape.set_dim(0, inputShape.dim(0));</div><div class="line"><a name="l00491"></a><span class="lineno"> 491</span>  outputShape.add_dim(1);</div><div class="line"><a name="l00492"></a><span class="lineno"> 492</span>  <span class="comment">// Ensures that dimension 1 of the convolution output is split according to the number of groups.</span></div><div class="line"><a name="l00493"></a><span class="lineno"> 493</span>  outputShape.set_dim(1, numFilters / numGroups);</div><div class="line"><a name="l00494"></a><span class="lineno"> 494</span>  outputShape.add_dim(2);</div><div class="line"><a name="l00495"></a><span class="lineno"> 495</span>  outputShape.set_dim(</div><div class="line"><a name="l00496"></a><span class="lineno"> 496</span>  2, (static_cast<int>(</div><div class="line"><a name="l00497"></a><span class="lineno"> 497</span>  static_cast<float>(inputShape.dim(2) + 2 * desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">m_PadBottom</a> - kernelH) /</div><div class="line"><a name="l00498"></a><span class="lineno"> 498</span>  static_cast<float>(desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">m_StrideY</a>)) + 1));</div><div class="line"><a name="l00499"></a><span class="lineno"> 499</span>  outputShape.add_dim(3);</div><div class="line"><a name="l00500"></a><span class="lineno"> 500</span>  outputShape.set_dim(</div><div class="line"><a name="l00501"></a><span class="lineno"> 501</span>  3, (static_cast<int>(</div><div class="line"><a name="l00502"></a><span class="lineno"> 502</span>  static_cast<float>(inputShape.dim(3) + 2 * desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">m_PadRight</a> - kernelW) /</div><div class="line"><a name="l00503"></a><span class="lineno"> 503</span>  static_cast<float>(desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">m_StrideX</a>)) + 1));</div><div class="line"><a name="l00504"></a><span class="lineno"> 504</span> </div><div class="line"><a name="l00505"></a><span class="lineno"> 505</span>  <span class="comment">// Load the weight data for ALL groups</span></div><div class="line"><a name="l00506"></a><span class="lineno"> 506</span>  vector<float> weightData(boost::numeric_cast<size_t>(numGroups *</div><div class="line"><a name="l00507"></a><span class="lineno"> 507</span>  inputShape.dim(1) * <span class="comment">// number of input channels</span></div><div class="line"><a name="l00508"></a><span class="lineno"> 508</span>  outputShape.dim(1) * <span class="comment">// number of output channels</span></div><div class="line"><a name="l00509"></a><span class="lineno"> 509</span>  kernelH *</div><div class="line"><a name="l00510"></a><span class="lineno"> 510</span>  kernelW));</div><div class="line"><a name="l00511"></a><span class="lineno"> 511</span>  GetDataFromBlob(layerParam, weightData, 0);</div><div class="line"><a name="l00512"></a><span class="lineno"> 512</span> </div><div class="line"><a name="l00513"></a><span class="lineno"> 513</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weightDimSizes[4] = {</div><div class="line"><a name="l00514"></a><span class="lineno"> 514</span>  <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(1)),</div><div class="line"><a name="l00515"></a><span class="lineno"> 515</span>  static_cast<unsigned int>(inputShape.dim(1)),</div><div class="line"><a name="l00516"></a><span class="lineno"> 516</span>  kernelH,</div><div class="line"><a name="l00517"></a><span class="lineno"> 517</span>  kernelW};</div><div class="line"><a name="l00518"></a><span class="lineno"> 518</span> </div><div class="line"><a name="l00519"></a><span class="lineno"> 519</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> biasInfo;</div><div class="line"><a name="l00520"></a><span class="lineno"> 520</span>  vector<float> biasData;</div><div class="line"><a name="l00521"></a><span class="lineno"> 521</span> </div><div class="line"><a name="l00522"></a><span class="lineno"> 522</span>  <span class="keywordflow">if</span> (desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a>)</div><div class="line"><a name="l00523"></a><span class="lineno"> 523</span>  {</div><div class="line"><a name="l00524"></a><span class="lineno"> 524</span>  biasData.resize(boost::numeric_cast<size_t>(numGroups * outputShape.dim(1)), 1.f);</div><div class="line"><a name="l00525"></a><span class="lineno"> 525</span>  GetDataFromBlob(layerParam, biasData, 1);</div><div class="line"><a name="l00526"></a><span class="lineno"> 526</span> </div><div class="line"><a name="l00527"></a><span class="lineno"> 527</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> biasDimSizes[1] = {<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(1))};</div><div class="line"><a name="l00528"></a><span class="lineno"> 528</span>  biasInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, biasDimSizes, DataType::Float32);</div><div class="line"><a name="l00529"></a><span class="lineno"> 529</span>  }</div><div class="line"><a name="l00530"></a><span class="lineno"> 530</span> </div><div class="line"><a name="l00531"></a><span class="lineno"> 531</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numWeightsPerGroup = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(weightData.size()) / numGroups;</div><div class="line"><a name="l00532"></a><span class="lineno"> 532</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numBiasesPerGroup = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>>(biasData.size()) / numGroups;</div><div class="line"><a name="l00533"></a><span class="lineno"> 533</span> </div><div class="line"><a name="l00534"></a><span class="lineno"> 534</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> g = 0; g < numGroups; ++g)</div><div class="line"><a name="l00535"></a><span class="lineno"> 535</span>  {</div><div class="line"><a name="l00536"></a><span class="lineno"> 536</span>  <span class="comment">// Sets the slot index, group 0 should be connected to the 0th output of the splitter</span></div><div class="line"><a name="l00537"></a><span class="lineno"> 537</span>  <span class="comment">// group 1 should be connected to the 1st output of the splitter.</span></div><div class="line"><a name="l00538"></a><span class="lineno"> 538</span> </div><div class="line"><a name="l00539"></a><span class="lineno"> 539</span>  <span class="comment">// Pulls out the weights for this group from that loaded from the model file earlier.</span></div><div class="line"><a name="l00540"></a><span class="lineno"> 540</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> weights(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(4, weightDimSizes, DataType::Float32),</div><div class="line"><a name="l00541"></a><span class="lineno"> 541</span>  weightData.data() + numWeightsPerGroup * g);</div><div class="line"><a name="l00542"></a><span class="lineno"> 542</span> </div><div class="line"><a name="l00543"></a><span class="lineno"> 543</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* convLayer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00544"></a><span class="lineno"> 544</span>  <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a> optionalBiases;</div><div class="line"><a name="l00545"></a><span class="lineno"> 545</span>  <span class="keywordflow">if</span> (desc.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a>)</div><div class="line"><a name="l00546"></a><span class="lineno"> 546</span>  {</div><div class="line"><a name="l00547"></a><span class="lineno"> 547</span>  <span class="comment">// Pulls out the biases for this group from that loaded from the model file earlier.</span></div><div class="line"><a name="l00548"></a><span class="lineno"> 548</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> biases(biasInfo, biasData.data() + numBiasesPerGroup * g);</div><div class="line"><a name="l00549"></a><span class="lineno"> 549</span>  optionalBiases = <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a>(biases);</div><div class="line"><a name="l00550"></a><span class="lineno"> 550</span>  }</div><div class="line"><a name="l00551"></a><span class="lineno"> 551</span>  convLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddConvolution2dLayer(desc,</div><div class="line"><a name="l00552"></a><span class="lineno"> 552</span>  weights,</div><div class="line"><a name="l00553"></a><span class="lineno"> 553</span>  optionalBiases,</div><div class="line"><a name="l00554"></a><span class="lineno"> 554</span>  convLayerNames[g].c_str());</div><div class="line"><a name="l00555"></a><span class="lineno"> 555</span>  convLayers[g] = convLayer;</div><div class="line"><a name="l00556"></a><span class="lineno"> 556</span> </div><div class="line"><a name="l00557"></a><span class="lineno"> 557</span>  <span class="comment">// If we have more than one group then the input to the nth convolution the splitter layer's nth output,</span></div><div class="line"><a name="l00558"></a><span class="lineno"> 558</span>  <span class="comment">// otherwise it's the regular input to this layer.</span></div><div class="line"><a name="l00559"></a><span class="lineno"> 559</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& splitterInputConnection =</div><div class="line"><a name="l00560"></a><span class="lineno"> 560</span>  splitterLayer ? splitterLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(g) : inputConnection;</div><div class="line"><a name="l00561"></a><span class="lineno"> 561</span>  splitterInputConnection.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(convLayer->GetInputSlot(0));</div><div class="line"><a name="l00562"></a><span class="lineno"> 562</span>  convLayer->GetOutputSlot(0).SetTensorInfo(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a>(outputShape));</div><div class="line"><a name="l00563"></a><span class="lineno"> 563</span>  }</div><div class="line"><a name="l00564"></a><span class="lineno"> 564</span> </div><div class="line"><a name="l00565"></a><span class="lineno"> 565</span>  <span class="comment">// If the convolution was performed in chunks, add a layer to concatenate the results</span></div><div class="line"><a name="l00566"></a><span class="lineno"> 566</span> </div><div class="line"><a name="l00567"></a><span class="lineno"> 567</span>  <span class="comment">// The merge input shape matches that of the convolution output</span></div><div class="line"><a name="l00568"></a><span class="lineno"> 568</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> concatDimSizes[4] = {<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(0)),</div><div class="line"><a name="l00569"></a><span class="lineno"> 569</span>  static_cast<unsigned int>(outputShape.dim(1)),</div><div class="line"><a name="l00570"></a><span class="lineno"> 570</span>  static_cast<unsigned int>(outputShape.dim(2)),</div><div class="line"><a name="l00571"></a><span class="lineno"> 571</span>  static_cast<unsigned int>(outputShape.dim(3))};</div><div class="line"><a name="l00572"></a><span class="lineno"> 572</span> </div><div class="line"><a name="l00573"></a><span class="lineno"> 573</span>  <span class="comment">// This is used to describe how the input is to be concatenated</span></div><div class="line"><a name="l00574"></a><span class="lineno"> 574</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDesc(numGroups);</div><div class="line"><a name="l00575"></a><span class="lineno"> 575</span> </div><div class="line"><a name="l00576"></a><span class="lineno"> 576</span>  <span class="comment">// Now create an input node for each group, using the name from</span></div><div class="line"><a name="l00577"></a><span class="lineno"> 577</span>  <span class="comment">// the output of the corresponding convolution</span></div><div class="line"><a name="l00578"></a><span class="lineno"> 578</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> g = 0; g < numGroups; ++g)</div><div class="line"><a name="l00579"></a><span class="lineno"> 579</span>  {</div><div class="line"><a name="l00580"></a><span class="lineno"> 580</span>  concatDesc.SetViewOriginCoord(g, 1, concatDimSizes[1] * g);</div><div class="line"><a name="l00581"></a><span class="lineno"> 581</span>  }</div><div class="line"><a name="l00582"></a><span class="lineno"> 582</span> </div><div class="line"><a name="l00583"></a><span class="lineno"> 583</span>  <span class="comment">// Make sure the output from the concat is the correct size to hold the data for all groups</span></div><div class="line"><a name="l00584"></a><span class="lineno"> 584</span>  concatDimSizes[1] *= numGroups;</div><div class="line"><a name="l00585"></a><span class="lineno"> 585</span>  outputShape.set_dim(1, concatDimSizes[1]);</div><div class="line"><a name="l00586"></a><span class="lineno"> 586</span> </div><div class="line"><a name="l00587"></a><span class="lineno"> 587</span>  <span class="comment">// Finally add the concat layer</span></div><div class="line"><a name="l00588"></a><span class="lineno"> 588</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* concatLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddConcatLayer(concatDesc, layerParam.name().c_str());</div><div class="line"><a name="l00589"></a><span class="lineno"> 589</span> </div><div class="line"><a name="l00590"></a><span class="lineno"> 590</span>  <span class="keywordflow">if</span> (!concatLayer)</div><div class="line"><a name="l00591"></a><span class="lineno"> 591</span>  {</div><div class="line"><a name="l00592"></a><span class="lineno"> 592</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00593"></a><span class="lineno"> 593</span>  boost::str(</div><div class="line"><a name="l00594"></a><span class="lineno"> 594</span>  boost::format(</div><div class="line"><a name="l00595"></a><span class="lineno"> 595</span>  <span class="stringliteral">"Failed to create final concat layer for Split+Convolution+Concat. "</span></div><div class="line"><a name="l00596"></a><span class="lineno"> 596</span>  <span class="stringliteral">"Layer=%1% #groups=%2% #filters=%3% %4%"</span>) %</div><div class="line"><a name="l00597"></a><span class="lineno"> 597</span>  layerParam.name() %</div><div class="line"><a name="l00598"></a><span class="lineno"> 598</span>  numGroups %</div><div class="line"><a name="l00599"></a><span class="lineno"> 599</span>  numFilters %</div><div class="line"><a name="l00600"></a><span class="lineno"> 600</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00601"></a><span class="lineno"> 601</span>  }</div><div class="line"><a name="l00602"></a><span class="lineno"> 602</span> </div><div class="line"><a name="l00603"></a><span class="lineno"> 603</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> g = 0; g < numGroups; ++g)</div><div class="line"><a name="l00604"></a><span class="lineno"> 604</span>  {</div><div class="line"><a name="l00605"></a><span class="lineno"> 605</span>  convLayers[g]->GetOutputSlot(0).Connect(concatLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(g));</div><div class="line"><a name="l00606"></a><span class="lineno"> 606</span>  }</div><div class="line"><a name="l00607"></a><span class="lineno"> 607</span>  concatLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(4, concatDimSizes, DataType::Float32));</div><div class="line"><a name="l00608"></a><span class="lineno"> 608</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), concatLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l00609"></a><span class="lineno"> 609</span> }</div><div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_aa9e49717ebdb741e8c767741647fc618"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">armnn::Convolution2dDescriptor::m_PadBottom</a></div><div class="ttdeci">uint32_t m_PadBottom</div><div class="ttdoc">Padding bottom value in the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00428">Descriptors.hpp:428</a></div></div> |
| 433 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_aea202e14d8874cefd9a0f778022b7e25"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">armnn::Convolution2dDescriptor::m_BiasEnabled</a></div><div class="ttdeci">bool m_BiasEnabled</div><div class="ttdoc">Enable/disable bias. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00438">Descriptors.hpp:438</a></div></div> |
| 434 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_ac2dac3b61c94de52093616be4ab17f8d"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#ac2dac3b61c94de52093616be4ab17f8d">armnn::IConnectableLayer::GetNumOutputSlots</a></div><div class="ttdeci">virtual unsigned int GetNumOutputSlots() const =0</div><div class="ttdoc">Returns the number of connectable output slots. </div></div> |
| 435 | <div class="ttc" id="structarmnn_1_1_views_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_views_descriptor.xhtml">armnn::ViewsDescriptor</a></div><div class="ttdoc">A ViewsDescriptor for the SplitterLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00190">Descriptors.hpp:190</a></div></div> |
| 436 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 437 | <div class="ttc" id="classarmnn_1_1_optional_xhtml"><div class="ttname"><a href="classarmnn_1_1_optional.xhtml">armnn::Optional</a></div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00270">Optional.hpp:270</a></div></div> |
| 438 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 439 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 440 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_a002bc30e590d78cbb4f4d12171055ca7"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">armnn::Convolution2dDescriptor::m_PadRight</a></div><div class="ttdeci">uint32_t m_PadRight</div><div class="ttdoc">Padding right value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00424">Descriptors.hpp:424</a></div></div> |
| 441 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 442 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_afe6a3377c4531315354def9023c8fdda"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">armnn::Convolution2dDescriptor::m_StrideX</a></div><div class="ttdeci">uint32_t m_StrideX</div><div class="ttdoc">Stride value when proceeding through input for the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00430">Descriptors.hpp:430</a></div></div> |
| 443 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 444 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 445 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 446 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 447 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a77e6c08b48c99fafa560805270503856"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">armnnCaffeParser::CaffeParserBase::BlobShapeToTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo BlobShapeToTensorInfo(const caffe::BlobShape &blobShape) const</div><div class="ttdoc">Converts Caffe&#39;s protobuf tensor shape format to ArmNN&#39;s. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParser.cpp:314</a></div></div> |
| 448 | <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> |
| 449 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_ac1fe174bbadfb39a2b636940c2e647c8"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">armnn::Convolution2dDescriptor::m_StrideY</a></div><div class="ttdeci">uint32_t m_StrideY</div><div class="ttdoc">Stride value when proceeding through input for the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00432">Descriptors.hpp:432</a></div></div> |
| 450 | <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> |
| 451 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 452 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 453 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 454 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 455 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 456 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 457 | <div class="ttc" id="namespacearmnn_caffe_parser_xhtml_af3fde7630e7c9df35cae9ed2b435dbed"><div class="ttname"><a href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">armnnCaffeParser::TensorDescToBlobShape</a></div><div class="ttdeci">BlobShape TensorDescToBlobShape(const TensorInfo &desc)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00325">CaffeParser.cpp:325</a></div></div> |
| 458 | </div><!-- fragment --> |
| 459 | </div> |
| 460 | </div> |
| 461 | <a id="a77e6c08b48c99fafa560805270503856"></a> |
| 462 | <h2 class="memtitle"><span class="permalink"><a href="#a77e6c08b48c99fafa560805270503856">◆ </a></span>BlobShapeToTensorInfo()</h2> |
| 463 | |
| 464 | <div class="memitem"> |
| 465 | <div class="memproto"> |
| 466 | <table class="mlabels"> |
| 467 | <tr> |
| 468 | <td class="mlabels-left"> |
| 469 | <table class="memname"> |
| 470 | <tr> |
| 471 | <td class="memname"><a class="el" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> BlobShapeToTensorInfo </td> |
| 472 | <td>(</td> |
| 473 | <td class="paramtype">const caffe::BlobShape & </td> |
| 474 | <td class="paramname"><em>blobShape</em></td><td>)</td> |
| 475 | <td> const</td> |
| 476 | </tr> |
| 477 | </table> |
| 478 | </td> |
| 479 | <td class="mlabels-right"> |
| 480 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 481 | </tr> |
| 482 | </table> |
| 483 | </div><div class="memdoc"> |
| 484 | |
| 485 | <p>Converts Caffe's protobuf tensor shape format to ArmNN's. </p> |
| 486 | |
| 487 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00314">314</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 488 | |
| 489 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParserBase::AddConvLayerWithDepthwiseConv()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParserBase::AddConvLayerWithSplits()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>.</p> |
| 490 | <div class="fragment"><div class="line"><a name="l00315"></a><span class="lineno"> 315</span> {</div><div class="line"><a name="l00316"></a><span class="lineno"> 316</span>  std::vector<unsigned int> shape;</div><div class="line"><a name="l00317"></a><span class="lineno"> 317</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < blobShape.dim_size(); ++j)</div><div class="line"><a name="l00318"></a><span class="lineno"> 318</span>  {</div><div class="line"><a name="l00319"></a><span class="lineno"> 319</span>  shape.push_back(static_cast<unsigned int>(blobShape.dim(j)));</div><div class="line"><a name="l00320"></a><span class="lineno"> 320</span>  }</div><div class="line"><a name="l00321"></a><span class="lineno"> 321</span> </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(boost::numeric_cast<unsigned int>(shape.size()), shape.data(), DataType::Float32);</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span> }</div><div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 491 | </div><!-- fragment --> |
| 492 | </div> |
| 493 | </div> |
| 494 | <a id="ae89a123aad1c66a76c398b7af216aae4"></a> |
| 495 | <h2 class="memtitle"><span class="permalink"><a href="#ae89a123aad1c66a76c398b7af216aae4">◆ </a></span>Cleanup()</h2> |
| 496 | |
| 497 | <div class="memitem"> |
| 498 | <div class="memproto"> |
| 499 | <table class="mlabels"> |
| 500 | <tr> |
| 501 | <td class="mlabels-left"> |
| 502 | <table class="memname"> |
| 503 | <tr> |
| 504 | <td class="memname">void Cleanup </td> |
| 505 | <td>(</td> |
| 506 | <td class="paramname"></td><td>)</td> |
| 507 | <td></td> |
| 508 | </tr> |
| 509 | </table> |
| 510 | </td> |
| 511 | <td class="mlabels-right"> |
| 512 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 513 | </tr> |
| 514 | </table> |
| 515 | </div><div class="memdoc"> |
| 516 | |
| 517 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">1860</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 518 | |
| 519 | <p class="reference">References <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParserBase::m_CaffeLayersByTopName</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParserBase::m_InputShapes</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParserBase::m_RequestedOutputs</a>.</p> |
| 520 | |
| 521 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>.</p> |
| 522 | <div class="fragment"><div class="line"><a name="l01860"></a><span class="lineno"> 1860</span>  {</div><div class="line"><a name="l01861"></a><span class="lineno"> 1861</span>  <span class="comment">// cleanup, in case we reuse this parser</span></div><div class="line"><a name="l01862"></a><span class="lineno"> 1862</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">m_InputShapes</a>.clear();</div><div class="line"><a name="l01863"></a><span class="lineno"> 1863</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">m_RequestedOutputs</a>.clear();</div><div class="line"><a name="l01864"></a><span class="lineno"> 1864</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>.clear();</div><div class="line"><a name="l01865"></a><span class="lineno"> 1865</span>  <span class="comment">// NOTE: when we get the text/string format</span></div><div class="line"><a name="l01866"></a><span class="lineno"> 1866</span>  <span class="comment">// optimised for memory then this data structure can</span></div><div class="line"><a name="l01867"></a><span class="lineno"> 1867</span>  <span class="comment">// also move to the CaffeParser class</span></div><div class="line"><a name="l01868"></a><span class="lineno"> 1868</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>.clear();</div><div class="line"><a name="l01869"></a><span class="lineno"> 1869</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a86cb41745deebd9b0ccf157d97d4d9ca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">armnnCaffeParser::CaffeParserBase::m_RequestedOutputs</a></div><div class="ttdeci">std::vector< std::string > m_RequestedOutputs</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParser.hpp:133</a></div></div> |
| 523 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9c99d40a72e6f0c6e4ad92d21e44edca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">armnnCaffeParser::CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">std::unordered_map< std::string, armnn::IOutputSlot * > m_ArmnnOutputSlotForCaffeTop</div><div class="ttdoc">As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops...</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParser.hpp:131</a></div></div> |
| 524 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a76ea67f3f7d1d5835c5a92b65dc0854c"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">armnnCaffeParser::CaffeParserBase::m_InputShapes</a></div><div class="ttdeci">std::map< std::string, armnn::TensorShape > m_InputShapes</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParser.hpp:128</a></div></div> |
| 525 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a1424f1bfbfc81d317b51053bbb315ef1"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">armnnCaffeParser::CaffeParserBase::m_CaffeLayersByTopName</a></div><div class="ttdeci">std::map< std::string, const caffe::LayerParameter * > m_CaffeLayersByTopName</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParser.hpp:139</a></div></div> |
| 526 | </div><!-- fragment --> |
| 527 | </div> |
| 528 | </div> |
| 529 | <a id="ab0bb4b8a290f1c8acd3c3a0d9a6e9783"></a> |
| 530 | <h2 class="memtitle"><span class="permalink"><a href="#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">◆ </a></span>CreateNetworkFromNetParameter()</h2> |
| 531 | |
| 532 | <div class="memitem"> |
| 533 | <div class="memproto"> |
| 534 | <table class="mlabels"> |
| 535 | <tr> |
| 536 | <td class="mlabels-left"> |
| 537 | <table class="memname"> |
| 538 | <tr> |
| 539 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> CreateNetworkFromNetParameter </td> |
| 540 | <td>(</td> |
| 541 | <td class="paramtype">caffe::NetParameter & </td> |
| 542 | <td class="paramname"><em>netParam</em>, </td> |
| 543 | </tr> |
| 544 | <tr> |
| 545 | <td class="paramkey"></td> |
| 546 | <td></td> |
| 547 | <td class="paramtype">const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > & </td> |
| 548 | <td class="paramname"><em>inputShapes</em>, </td> |
| 549 | </tr> |
| 550 | <tr> |
| 551 | <td class="paramkey"></td> |
| 552 | <td></td> |
| 553 | <td class="paramtype">const std::vector< std::string > & </td> |
| 554 | <td class="paramname"><em>requestedOutputs</em> </td> |
| 555 | </tr> |
| 556 | <tr> |
| 557 | <td></td> |
| 558 | <td>)</td> |
| 559 | <td></td><td></td> |
| 560 | </tr> |
| 561 | </table> |
| 562 | </td> |
| 563 | <td class="mlabels-right"> |
| 564 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 565 | </tr> |
| 566 | </table> |
| 567 | </div><div class="memdoc"> |
| 568 | |
| 569 | <p>Parses a NetParameter loaded into memory from one of the other CreateNetwork*. </p> |
| 570 | |
| 571 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">1829</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 572 | |
| 573 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParserBase::Cleanup()</a>, <a class="el" href="_network_8cpp_source.xhtml#l00049">INetwork::Create()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParserBase::m_InputShapes</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParserBase::m_NetworkInputsBindingInfo</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParserBase::m_NetworkOutputsBindingInfo</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParserBase::m_RequestedOutputs</a>.</p> |
| 574 | |
| 575 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01789">CaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01769">CaffeParserBase::CreateNetworkFromString()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01733">CaffeParserBase::CreateNetworkFromTextFile()</a>.</p> |
| 576 | <div class="fragment"><div class="line"><a name="l01832"></a><span class="lineno"> 1832</span> {</div><div class="line"><a name="l01833"></a><span class="lineno"> 1833</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">m_NetworkInputsBindingInfo</a>.clear();</div><div class="line"><a name="l01834"></a><span class="lineno"> 1834</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">m_NetworkOutputsBindingInfo</a>.clear();</div><div class="line"><a name="l01835"></a><span class="lineno"> 1835</span> </div><div class="line"><a name="l01836"></a><span class="lineno"> 1836</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a> = <a class="code" href="classarmnn_1_1_i_network.xhtml#a706f7345af3f18f4b16e226a672214c6">INetwork::Create</a>();</div><div class="line"><a name="l01837"></a><span class="lineno"> 1837</span> </div><div class="line"><a name="l01838"></a><span class="lineno"> 1838</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">m_InputShapes</a> = inputShapes;</div><div class="line"><a name="l01839"></a><span class="lineno"> 1839</span>  <span class="keywordflow">if</span> (requestedOutputs.size() == 0)</div><div class="line"><a name="l01840"></a><span class="lineno"> 1840</span>  {</div><div class="line"><a name="l01841"></a><span class="lineno"> 1841</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(<span class="stringliteral">"requestedOutputs must have at least one entry"</span>);</div><div class="line"><a name="l01842"></a><span class="lineno"> 1842</span>  }</div><div class="line"><a name="l01843"></a><span class="lineno"> 1843</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">m_RequestedOutputs</a> = requestedOutputs;</div><div class="line"><a name="l01844"></a><span class="lineno"> 1844</span> </div><div class="line"><a name="l01845"></a><span class="lineno"> 1845</span>  <span class="keywordflow">try</span></div><div class="line"><a name="l01846"></a><span class="lineno"> 1846</span>  {</div><div class="line"><a name="l01847"></a><span class="lineno"> 1847</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c5eed5d48d21a8b7e3bcd2cab519217">LoadNetParam</a>(netParam);</div><div class="line"><a name="l01848"></a><span class="lineno"> 1848</span>  }</div><div class="line"><a name="l01849"></a><span class="lineno"> 1849</span>  <span class="keywordflow">catch</span> (<span class="keyword">const</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>& e)</div><div class="line"><a name="l01850"></a><span class="lineno"> 1850</span>  {</div><div class="line"><a name="l01851"></a><span class="lineno"> 1851</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ae89a123aad1c66a76c398b7af216aae4">Cleanup</a>();</div><div class="line"><a name="l01852"></a><span class="lineno"> 1852</span>  <span class="keywordflow">throw</span> e;</div><div class="line"><a name="l01853"></a><span class="lineno"> 1853</span>  }</div><div class="line"><a name="l01854"></a><span class="lineno"> 1854</span> </div><div class="line"><a name="l01855"></a><span class="lineno"> 1855</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ae89a123aad1c66a76c398b7af216aae4">Cleanup</a>();</div><div class="line"><a name="l01856"></a><span class="lineno"> 1856</span> </div><div class="line"><a name="l01857"></a><span class="lineno"> 1857</span>  <span class="keywordflow">return</span> move(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>);</div><div class="line"><a name="l01858"></a><span class="lineno"> 1858</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ae89a123aad1c66a76c398b7af216aae4"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ae89a123aad1c66a76c398b7af216aae4">armnnCaffeParser::CaffeParserBase::Cleanup</a></div><div class="ttdeci">void Cleanup()</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParser.cpp:1860</a></div></div> |
| 577 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9c5eed5d48d21a8b7e3bcd2cab519217"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c5eed5d48d21a8b7e3bcd2cab519217">armnnCaffeParser::CaffeParserBase::LoadNetParam</a></div><div class="ttdeci">void LoadNetParam(caffe::NetParameter &netParameter)</div><div class="ttdoc">does the actual conversion from caffe::NetParameter to armnn::INetwork </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParser.cpp:1632</a></div></div> |
| 578 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a86cb41745deebd9b0ccf157d97d4d9ca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">armnnCaffeParser::CaffeParserBase::m_RequestedOutputs</a></div><div class="ttdeci">std::vector< std::string > m_RequestedOutputs</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParser.hpp:133</a></div></div> |
| 579 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ac62e2558c14e01605f2b4e1e21cdd1e8"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">armnnCaffeParser::CaffeParserBase::m_NetworkInputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkInputsBindingInfo</div><div class="ttdoc">maps input layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParser.hpp:121</a></div></div> |
| 580 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a62d6d6cba9ed0d3ad63fffb40aec86b5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">armnnCaffeParser::CaffeParserBase::m_NetworkOutputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkOutputsBindingInfo</div><div class="ttdoc">maps output layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParser.hpp:124</a></div></div> |
| 581 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a76ea67f3f7d1d5835c5a92b65dc0854c"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">armnnCaffeParser::CaffeParserBase::m_InputShapes</a></div><div class="ttdeci">std::map< std::string, armnn::TensorShape > m_InputShapes</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParser.hpp:128</a></div></div> |
| 582 | <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> |
| 583 | <div class="ttc" id="classarmnn_1_1_i_network_xhtml_a706f7345af3f18f4b16e226a672214c6"><div class="ttname"><a href="classarmnn_1_1_i_network.xhtml#a706f7345af3f18f4b16e226a672214c6">armnn::INetwork::Create</a></div><div class="ttdeci">static INetworkPtr Create()</div><div class="ttdef"><b>Definition:</b> <a href="_network_8cpp_source.xhtml#l00049">Network.cpp:49</a></div></div> |
| 584 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 585 | </div><!-- fragment --> |
| 586 | </div> |
| 587 | </div> |
| 588 | <a id="acd82aa5171feb1c852506964f3c5254b"></a> |
| 589 | <h2 class="memtitle"><span class="permalink"><a href="#acd82aa5171feb1c852506964f3c5254b">◆ </a></span>CreateNetworkFromString()</h2> |
| 590 | |
| 591 | <div class="memitem"> |
| 592 | <div class="memproto"> |
| 593 | <table class="mlabels"> |
| 594 | <tr> |
| 595 | <td class="mlabels-left"> |
| 596 | <table class="memname"> |
| 597 | <tr> |
| 598 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> CreateNetworkFromString </td> |
| 599 | <td>(</td> |
| 600 | <td class="paramtype">const char * </td> |
| 601 | <td class="paramname"><em>protoText</em>, </td> |
| 602 | </tr> |
| 603 | <tr> |
| 604 | <td class="paramkey"></td> |
| 605 | <td></td> |
| 606 | <td class="paramtype">const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > & </td> |
| 607 | <td class="paramname"><em>inputShapes</em>, </td> |
| 608 | </tr> |
| 609 | <tr> |
| 610 | <td class="paramkey"></td> |
| 611 | <td></td> |
| 612 | <td class="paramtype">const std::vector< std::string > & </td> |
| 613 | <td class="paramname"><em>requestedOutputs</em> </td> |
| 614 | </tr> |
| 615 | <tr> |
| 616 | <td></td> |
| 617 | <td>)</td> |
| 618 | <td></td><td></td> |
| 619 | </tr> |
| 620 | </table> |
| 621 | </td> |
| 622 | <td class="mlabels-right"> |
| 623 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 624 | </tr> |
| 625 | </table> |
| 626 | </div><div class="memdoc"> |
| 627 | |
| 628 | <p>Creates the network directly from protobuf text in a string. Useful for debugging/testing. </p> |
| 629 | |
| 630 | <p>Implements <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a985d357617c1627bbf35b3d9841ffe8c">ICaffeParser</a>.</p> |
| 631 | |
| 632 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01769">1769</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 633 | |
| 634 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>.</p> |
| 635 | <div class="fragment"><div class="line"><a name="l01772"></a><span class="lineno"> 1772</span> {</div><div class="line"><a name="l01773"></a><span class="lineno"> 1773</span>  <span class="comment">// Parses the string into a message.</span></div><div class="line"><a name="l01774"></a><span class="lineno"> 1774</span>  NetParameter netParam;</div><div class="line"><a name="l01775"></a><span class="lineno"> 1775</span>  <span class="keywordtype">bool</span> success = google::protobuf::TextFormat::ParseFromString(protoText, &netParam);</div><div class="line"><a name="l01776"></a><span class="lineno"> 1776</span> </div><div class="line"><a name="l01777"></a><span class="lineno"> 1777</span>  <span class="keywordflow">if</span> (!success)</div><div class="line"><a name="l01778"></a><span class="lineno"> 1778</span>  {</div><div class="line"><a name="l01779"></a><span class="lineno"> 1779</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01780"></a><span class="lineno"> 1780</span>  boost::str(</div><div class="line"><a name="l01781"></a><span class="lineno"> 1781</span>  boost::format(</div><div class="line"><a name="l01782"></a><span class="lineno"> 1782</span>  <span class="stringliteral">"Failed to parse graph string %1%"</span>) %</div><div class="line"><a name="l01783"></a><span class="lineno"> 1783</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01784"></a><span class="lineno"> 1784</span>  }</div><div class="line"><a name="l01785"></a><span class="lineno"> 1785</span> </div><div class="line"><a name="l01786"></a><span class="lineno"> 1786</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">CreateNetworkFromNetParameter</a>(netParam, inputShapes, requestedOutputs);</div><div class="line"><a name="l01787"></a><span class="lineno"> 1787</span> }</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> |
| 636 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ab0bb4b8a290f1c8acd3c3a0d9a6e9783"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">armnnCaffeParser::CaffeParserBase::CreateNetworkFromNetParameter</a></div><div class="ttdeci">armnn::INetworkPtr CreateNetworkFromNetParameter(caffe::NetParameter &netParam, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)</div><div class="ttdoc">Parses a NetParameter loaded into memory from one of the other CreateNetwork*. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParser.cpp:1829</a></div></div> |
| 637 | <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> |
| 638 | </div><!-- fragment --> |
| 639 | </div> |
| 640 | </div> |
| 641 | <a id="ae2d544957c50461d305b2517581c86d0"></a> |
| 642 | <h2 class="memtitle"><span class="permalink"><a href="#ae2d544957c50461d305b2517581c86d0">◆ </a></span>CreateNetworkFromTextFile()</h2> |
| 643 | |
| 644 | <div class="memitem"> |
| 645 | <div class="memproto"> |
| 646 | <table class="mlabels"> |
| 647 | <tr> |
| 648 | <td class="mlabels-left"> |
| 649 | <table class="memname"> |
| 650 | <tr> |
| 651 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">INetworkPtr</a> CreateNetworkFromTextFile </td> |
| 652 | <td>(</td> |
| 653 | <td class="paramtype">const char * </td> |
| 654 | <td class="paramname"><em>graphFile</em>, </td> |
| 655 | </tr> |
| 656 | <tr> |
| 657 | <td class="paramkey"></td> |
| 658 | <td></td> |
| 659 | <td class="paramtype">const std::map< std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a> > & </td> |
| 660 | <td class="paramname"><em>inputShapes</em>, </td> |
| 661 | </tr> |
| 662 | <tr> |
| 663 | <td class="paramkey"></td> |
| 664 | <td></td> |
| 665 | <td class="paramtype">const std::vector< std::string > & </td> |
| 666 | <td class="paramname"><em>requestedOutputs</em> </td> |
| 667 | </tr> |
| 668 | <tr> |
| 669 | <td></td> |
| 670 | <td>)</td> |
| 671 | <td></td><td></td> |
| 672 | </tr> |
| 673 | </table> |
| 674 | </td> |
| 675 | <td class="mlabels-right"> |
| 676 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 677 | </tr> |
| 678 | </table> |
| 679 | </div><div class="memdoc"> |
| 680 | |
| 681 | <p>Create the network from a protobuf text file on disk. </p> |
| 682 | |
| 683 | <p>Implements <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a2006ec5e8da2ebf087eedbd75652619e">ICaffeParser</a>.</p> |
| 684 | |
| 685 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01733">1733</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 686 | |
| 687 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>.</p> |
| 688 | <div class="fragment"><div class="line"><a name="l01736"></a><span class="lineno"> 1736</span> {</div><div class="line"><a name="l01737"></a><span class="lineno"> 1737</span>  FILE* fd = fopen(graphFile, <span class="stringliteral">"r"</span>);</div><div class="line"><a name="l01738"></a><span class="lineno"> 1738</span> </div><div class="line"><a name="l01739"></a><span class="lineno"> 1739</span>  <span class="keywordflow">if</span> (fd == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l01740"></a><span class="lineno"> 1740</span>  {</div><div class="line"><a name="l01741"></a><span class="lineno"> 1741</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_file_not_found_exception.xhtml">FileNotFoundException</a>(</div><div class="line"><a name="l01742"></a><span class="lineno"> 1742</span>  boost::str(</div><div class="line"><a name="l01743"></a><span class="lineno"> 1743</span>  boost::format(</div><div class="line"><a name="l01744"></a><span class="lineno"> 1744</span>  <span class="stringliteral">"Failed to open graph file: %1% %2%"</span>) %</div><div class="line"><a name="l01745"></a><span class="lineno"> 1745</span>  graphFile %</div><div class="line"><a name="l01746"></a><span class="lineno"> 1746</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01747"></a><span class="lineno"> 1747</span>  }</div><div class="line"><a name="l01748"></a><span class="lineno"> 1748</span> </div><div class="line"><a name="l01749"></a><span class="lineno"> 1749</span>  <span class="comment">// Parses the file into a message.</span></div><div class="line"><a name="l01750"></a><span class="lineno"> 1750</span>  NetParameter netParam;</div><div class="line"><a name="l01751"></a><span class="lineno"> 1751</span>  <span class="keyword">auto</span> input = <span class="keyword">new</span> google::protobuf::io::FileInputStream(fileno(fd));</div><div class="line"><a name="l01752"></a><span class="lineno"> 1752</span>  <span class="keywordtype">bool</span> success = google::protobuf::TextFormat::Parse(input, &netParam);</div><div class="line"><a name="l01753"></a><span class="lineno"> 1753</span>  <span class="keyword">delete</span> input;</div><div class="line"><a name="l01754"></a><span class="lineno"> 1754</span>  fclose(fd);</div><div class="line"><a name="l01755"></a><span class="lineno"> 1755</span> </div><div class="line"><a name="l01756"></a><span class="lineno"> 1756</span>  <span class="keywordflow">if</span> (!success)</div><div class="line"><a name="l01757"></a><span class="lineno"> 1757</span>  {</div><div class="line"><a name="l01758"></a><span class="lineno"> 1758</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01759"></a><span class="lineno"> 1759</span>  boost::str(</div><div class="line"><a name="l01760"></a><span class="lineno"> 1760</span>  boost::format(</div><div class="line"><a name="l01761"></a><span class="lineno"> 1761</span>  <span class="stringliteral">"Failed to parse graph file: %1% %2%"</span>) %</div><div class="line"><a name="l01762"></a><span class="lineno"> 1762</span>  graphFile %</div><div class="line"><a name="l01763"></a><span class="lineno"> 1763</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01764"></a><span class="lineno"> 1764</span>  }</div><div class="line"><a name="l01765"></a><span class="lineno"> 1765</span> </div><div class="line"><a name="l01766"></a><span class="lineno"> 1766</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">CreateNetworkFromNetParameter</a>(netParam, inputShapes, requestedOutputs);</div><div class="line"><a name="l01767"></a><span class="lineno"> 1767</span> }</div><div class="ttc" id="classarmnn_1_1_file_not_found_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_file_not_found_exception.xhtml">armnn::FileNotFoundException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00086">Exceptions.hpp:86</a></div></div> |
| 689 | <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> |
| 690 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ab0bb4b8a290f1c8acd3c3a0d9a6e9783"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab0bb4b8a290f1c8acd3c3a0d9a6e9783">armnnCaffeParser::CaffeParserBase::CreateNetworkFromNetParameter</a></div><div class="ttdeci">armnn::INetworkPtr CreateNetworkFromNetParameter(caffe::NetParameter &netParam, const std::map< std::string, armnn::TensorShape > &inputShapes, const std::vector< std::string > &requestedOutputs)</div><div class="ttdoc">Parses a NetParameter loaded into memory from one of the other CreateNetwork*. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParser.cpp:1829</a></div></div> |
| 691 | <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> |
| 692 | </div><!-- fragment --> |
| 693 | </div> |
| 694 | </div> |
| 695 | <a id="a9650b8810d4e6734b255ca25d495fe06"></a> |
| 696 | <h2 class="memtitle"><span class="permalink"><a href="#a9650b8810d4e6734b255ca25d495fe06">◆ </a></span>GetArmnnOutputSlotForCaffeTop()</h2> |
| 697 | |
| 698 | <div class="memitem"> |
| 699 | <div class="memproto"> |
| 700 | <table class="mlabels"> |
| 701 | <tr> |
| 702 | <td class="mlabels-left"> |
| 703 | <table class="memname"> |
| 704 | <tr> |
| 705 | <td class="memname"><a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a> & GetArmnnOutputSlotForCaffeTop </td> |
| 706 | <td>(</td> |
| 707 | <td class="paramtype">const std::string & </td> |
| 708 | <td class="paramname"><em>caffeTopName</em></td><td>)</td> |
| 709 | <td> const</td> |
| 710 | </tr> |
| 711 | </table> |
| 712 | </td> |
| 713 | <td class="mlabels-right"> |
| 714 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 715 | </tr> |
| 716 | </table> |
| 717 | </div><div class="memdoc"> |
| 718 | |
| 719 | <p>Retrieves the Armnn IOutputSlot representing the given Caffe top. </p> |
| 720 | <p>Throws if it cannot be found (e.g. not parsed yet). </p> |
| 721 | |
| 722 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">1533</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 723 | |
| 724 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a>.</p> |
| 725 | |
| 726 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParserBase::AddConvLayerWithDepthwiseConv()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParserBase::AddConvLayerWithSplits()</a>, <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01338">CaffeParserBase::ParseBatchNormLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01277">CaffeParserBase::ParseConcatLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01477">CaffeParserBase::ParseDropoutLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01230">CaffeParserBase::ParseEltwiseLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01134">CaffeParserBase::ParseInnerProductLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01027">CaffeParserBase::ParseLRNLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00883">CaffeParserBase::ParsePoolingLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01001">CaffeParserBase::ParseReluLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01404">CaffeParserBase::ParseScaleLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01208">CaffeParserBase::ParseSoftmaxLayer()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01456">CaffeParserBase::ParseSplitLayer()</a>.</p> |
| 727 | <div class="fragment"><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>  <span class="keyword">auto</span> it = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>.find(caffeTopName);</div><div class="line"><a name="l01536"></a><span class="lineno"> 1536</span>  <span class="keywordflow">if</span> (it != <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>.end())</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> *it->second;</div><div class="line"><a name="l01539"></a><span class="lineno"> 1539</span>  }</div><div class="line"><a name="l01540"></a><span class="lineno"> 1540</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01541"></a><span class="lineno"> 1541</span>  {</div><div class="line"><a name="l01542"></a><span class="lineno"> 1542</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01543"></a><span class="lineno"> 1543</span>  boost::str(</div><div class="line"><a name="l01544"></a><span class="lineno"> 1544</span>  boost::format(</div><div class="line"><a name="l01545"></a><span class="lineno"> 1545</span>  <span class="stringliteral">"Could not find armnn output slot for Caffe top '%1%' %2%"</span>) %</div><div class="line"><a name="l01546"></a><span class="lineno"> 1546</span>  caffeTopName %</div><div class="line"><a name="l01547"></a><span class="lineno"> 1547</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01548"></a><span class="lineno"> 1548</span>  }</div><div class="line"><a name="l01549"></a><span class="lineno"> 1549</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9c99d40a72e6f0c6e4ad92d21e44edca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">armnnCaffeParser::CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">std::unordered_map< std::string, armnn::IOutputSlot * > m_ArmnnOutputSlotForCaffeTop</div><div class="ttdoc">As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops...</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParser.hpp:131</a></div></div> |
| 728 | <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> |
| 729 | <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> |
| 730 | </div><!-- fragment --> |
| 731 | </div> |
| 732 | </div> |
| 733 | <a id="afb7e4da478bab76261963479baad5788"></a> |
| 734 | <h2 class="memtitle"><span class="permalink"><a href="#afb7e4da478bab76261963479baad5788">◆ </a></span>GetBindingInfo()</h2> |
| 735 | |
| 736 | <div class="memitem"> |
| 737 | <div class="memproto"> |
| 738 | <table class="mlabels"> |
| 739 | <tr> |
| 740 | <td class="mlabels-left"> |
| 741 | <table class="memname"> |
| 742 | <tr> |
| 743 | <td class="memname">std::pair< <a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a>, <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> > GetBindingInfo </td> |
| 744 | <td>(</td> |
| 745 | <td class="paramtype">const std::string & </td> |
| 746 | <td class="paramname"><em>layerName</em>, </td> |
| 747 | </tr> |
| 748 | <tr> |
| 749 | <td class="paramkey"></td> |
| 750 | <td></td> |
| 751 | <td class="paramtype">const char * </td> |
| 752 | <td class="paramname"><em>bindingPointDesc</em>, </td> |
| 753 | </tr> |
| 754 | <tr> |
| 755 | <td class="paramkey"></td> |
| 756 | <td></td> |
| 757 | <td class="paramtype">const std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > & </td> |
| 758 | <td class="paramname"><em>bindingInfos</em> </td> |
| 759 | </tr> |
| 760 | <tr> |
| 761 | <td></td> |
| 762 | <td>)</td> |
| 763 | <td></td><td></td> |
| 764 | </tr> |
| 765 | </table> |
| 766 | </td> |
| 767 | <td class="mlabels-right"> |
| 768 | <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span> </td> |
| 769 | </tr> |
| 770 | </table> |
| 771 | </div><div class="memdoc"> |
| 772 | |
| 773 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00296">296</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 774 | |
| 775 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>.</p> |
| 776 | |
| 777 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00286">CaffeParserBase::GetNetworkInputBindingInfo()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00291">CaffeParserBase::GetNetworkOutputBindingInfo()</a>.</p> |
| 778 | <div class="fragment"><div class="line"><a name="l00299"></a><span class="lineno"> 299</span> {</div><div class="line"><a name="l00300"></a><span class="lineno"> 300</span>  <span class="keyword">auto</span> it = nameToBindingInfo.find(layerName);</div><div class="line"><a name="l00301"></a><span class="lineno"> 301</span>  <span class="keywordflow">if</span> (it == nameToBindingInfo.end())</div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span>  {</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_invalid_argument_exception.xhtml">InvalidArgumentException</a>(</div><div class="line"><a name="l00304"></a><span class="lineno"> 304</span>  boost::str(</div><div class="line"><a name="l00305"></a><span class="lineno"> 305</span>  boost::format(</div><div class="line"><a name="l00306"></a><span class="lineno"> 306</span>  <span class="stringliteral">"Unknown binding %1% for layer '%2%'. %3%"</span>) %</div><div class="line"><a name="l00307"></a><span class="lineno"> 307</span>  bindingPointDesc %</div><div class="line"><a name="l00308"></a><span class="lineno"> 308</span>  layerName %</div><div class="line"><a name="l00309"></a><span class="lineno"> 309</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00310"></a><span class="lineno"> 310</span>  }</div><div class="line"><a name="l00311"></a><span class="lineno"> 311</span>  <span class="keywordflow">return</span> it->second;</div><div class="line"><a name="l00312"></a><span class="lineno"> 312</span> }</div><div class="ttc" id="classarmnn_1_1_invalid_argument_exception_xhtml"><div class="ttname"><a href="classarmnn_1_1_invalid_argument_exception.xhtml">armnn::InvalidArgumentException</a></div><div class="ttdef"><b>Definition:</b> <a href="_exceptions_8hpp_source.xhtml#l00080">Exceptions.hpp:80</a></div></div> |
| 779 | <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> |
| 780 | </div><!-- fragment --> |
| 781 | </div> |
| 782 | </div> |
| 783 | <a id="a2f8fbd66c1a39a06d61fcb6536387d64"></a> |
| 784 | <h2 class="memtitle"><span class="permalink"><a href="#a2f8fbd66c1a39a06d61fcb6536387d64">◆ </a></span>GetInputs()</h2> |
| 785 | |
| 786 | <div class="memitem"> |
| 787 | <div class="memproto"> |
| 788 | <table class="mlabels"> |
| 789 | <tr> |
| 790 | <td class="mlabels-left"> |
| 791 | <table class="memname"> |
| 792 | <tr> |
| 793 | <td class="memname">vector< const LayerParameter * > GetInputs </td> |
| 794 | <td>(</td> |
| 795 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 796 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 797 | <td></td> |
| 798 | </tr> |
| 799 | </table> |
| 800 | </td> |
| 801 | <td class="mlabels-right"> |
| 802 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 803 | </tr> |
| 804 | </table> |
| 805 | </div><div class="memdoc"> |
| 806 | |
| 807 | <p>Find the Caffe layers listed as inputs (bottoms) for a given layer. </p> |
| 808 | |
| 809 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00339">339</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 810 | |
| 811 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParserBase::m_CaffeLayersByTopName</a>.</p> |
| 812 | |
| 813 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 814 | <div class="fragment"><div class="line"><a name="l00340"></a><span class="lineno"> 340</span> {</div><div class="line"><a name="l00341"></a><span class="lineno"> 341</span>  std::vector<const caffe::LayerParameter*> ret;</div><div class="line"><a name="l00342"></a><span class="lineno"> 342</span>  ret.reserve(boost::numeric_cast<size_t>(layerParam.bottom_size()));</div><div class="line"><a name="l00343"></a><span class="lineno"> 343</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> j = 0; j < layerParam.bottom_size(); ++j)</div><div class="line"><a name="l00344"></a><span class="lineno"> 344</span>  {</div><div class="line"><a name="l00345"></a><span class="lineno"> 345</span>  std::string inputName = layerParam.bottom(j);</div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span>  <span class="keyword">auto</span> inputIt = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>.find(inputName);</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span>  <span class="keywordflow">if</span> (inputIt == <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>.end())</div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span>  {</div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span>  boost::str(</div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span>  boost::format(</div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span>  <span class="stringliteral">"Can't find Caffe layer with top called '%1%', "</span></div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span>  <span class="stringliteral">"which is listed as an input of '%2%'. %3%"</span>) %</div><div class="line"><a name="l00354"></a><span class="lineno"> 354</span>  inputName %</div><div class="line"><a name="l00355"></a><span class="lineno"> 355</span>  layerParam.name() %</div><div class="line"><a name="l00356"></a><span class="lineno"> 356</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00357"></a><span class="lineno"> 357</span>  }</div><div class="line"><a name="l00358"></a><span class="lineno"> 358</span>  ret.push_back(inputIt->second);</div><div class="line"><a name="l00359"></a><span class="lineno"> 359</span>  }</div><div class="line"><a name="l00360"></a><span class="lineno"> 360</span> </div><div class="line"><a name="l00361"></a><span class="lineno"> 361</span>  <span class="keywordflow">return</span> ret;</div><div class="line"><a name="l00362"></a><span class="lineno"> 362</span> }</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> |
| 815 | <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> |
| 816 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a1424f1bfbfc81d317b51053bbb315ef1"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">armnnCaffeParser::CaffeParserBase::m_CaffeLayersByTopName</a></div><div class="ttdeci">std::map< std::string, const caffe::LayerParameter * > m_CaffeLayersByTopName</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParser.hpp:139</a></div></div> |
| 817 | </div><!-- fragment --> |
| 818 | </div> |
| 819 | </div> |
| 820 | <a id="aba39201ebaeb0738f15a14b3c8da1f5a"></a> |
| 821 | <h2 class="memtitle"><span class="permalink"><a href="#aba39201ebaeb0738f15a14b3c8da1f5a">◆ </a></span>GetNetworkInputBindingInfo()</h2> |
| 822 | |
| 823 | <div class="memitem"> |
| 824 | <div class="memproto"> |
| 825 | <table class="mlabels"> |
| 826 | <tr> |
| 827 | <td class="mlabels-left"> |
| 828 | <table class="memname"> |
| 829 | <tr> |
| 830 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> GetNetworkInputBindingInfo </td> |
| 831 | <td>(</td> |
| 832 | <td class="paramtype">const std::string & </td> |
| 833 | <td class="paramname"><em>name</em></td><td>)</td> |
| 834 | <td> const</td> |
| 835 | </tr> |
| 836 | </table> |
| 837 | </td> |
| 838 | <td class="mlabels-right"> |
| 839 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 840 | </tr> |
| 841 | </table> |
| 842 | </div><div class="memdoc"> |
| 843 | |
| 844 | <p>Retrieves binding info (layer id and tensor info) for the network input identified by the given layer name. </p> |
| 845 | |
| 846 | <p>Implements <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#adbba18b867f84bfcd3c88d06f275eac9">ICaffeParser</a>.</p> |
| 847 | |
| 848 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00286">286</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 849 | |
| 850 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00296">CaffeParserBase::GetBindingInfo()</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParserBase::m_NetworkInputsBindingInfo</a>.</p> |
| 851 | <div class="fragment"><div class="line"><a name="l00287"></a><span class="lineno"> 287</span> {</div><div class="line"><a name="l00288"></a><span class="lineno"> 288</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#afb7e4da478bab76261963479baad5788">GetBindingInfo</a>(name, <span class="stringliteral">"input"</span>, <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">m_NetworkInputsBindingInfo</a>);</div><div class="line"><a name="l00289"></a><span class="lineno"> 289</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_afb7e4da478bab76261963479baad5788"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#afb7e4da478bab76261963479baad5788">armnnCaffeParser::CaffeParserBase::GetBindingInfo</a></div><div class="ttdeci">static std::pair< armnn::LayerBindingId, armnn::TensorInfo > GetBindingInfo(const std::string &layerName, const char *bindingPointDesc, const std::unordered_map< std::string, BindingPointInfo > &bindingInfos)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00296">CaffeParser.cpp:296</a></div></div> |
| 852 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ac62e2558c14e01605f2b4e1e21cdd1e8"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">armnnCaffeParser::CaffeParserBase::m_NetworkInputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkInputsBindingInfo</div><div class="ttdoc">maps input layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParser.hpp:121</a></div></div> |
| 853 | </div><!-- fragment --> |
| 854 | </div> |
| 855 | </div> |
| 856 | <a id="aee8c8fa7de3c87392791d9f8dd90655f"></a> |
| 857 | <h2 class="memtitle"><span class="permalink"><a href="#aee8c8fa7de3c87392791d9f8dd90655f">◆ </a></span>GetNetworkOutputBindingInfo()</h2> |
| 858 | |
| 859 | <div class="memitem"> |
| 860 | <div class="memproto"> |
| 861 | <table class="mlabels"> |
| 862 | <tr> |
| 863 | <td class="mlabels-left"> |
| 864 | <table class="memname"> |
| 865 | <tr> |
| 866 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> GetNetworkOutputBindingInfo </td> |
| 867 | <td>(</td> |
| 868 | <td class="paramtype">const std::string & </td> |
| 869 | <td class="paramname"><em>name</em></td><td>)</td> |
| 870 | <td> const</td> |
| 871 | </tr> |
| 872 | </table> |
| 873 | </td> |
| 874 | <td class="mlabels-right"> |
| 875 | <span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td> |
| 876 | </tr> |
| 877 | </table> |
| 878 | </div><div class="memdoc"> |
| 879 | |
| 880 | <p>Retrieves binding info (layer id and tensor info) for the network output identified by the given layer name. </p> |
| 881 | |
| 882 | <p>Implements <a class="el" href="classarmnn_caffe_parser_1_1_i_caffe_parser.xhtml#a99d33c004ce680f49893c9254d9bff5a">ICaffeParser</a>.</p> |
| 883 | |
| 884 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00291">291</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 885 | |
| 886 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00296">CaffeParserBase::GetBindingInfo()</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParserBase::m_NetworkOutputsBindingInfo</a>.</p> |
| 887 | <div class="fragment"><div class="line"><a name="l00292"></a><span class="lineno"> 292</span> {</div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#afb7e4da478bab76261963479baad5788">GetBindingInfo</a>(name, <span class="stringliteral">"output"</span>, <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">m_NetworkOutputsBindingInfo</a>);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_afb7e4da478bab76261963479baad5788"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#afb7e4da478bab76261963479baad5788">armnnCaffeParser::CaffeParserBase::GetBindingInfo</a></div><div class="ttdeci">static std::pair< armnn::LayerBindingId, armnn::TensorInfo > GetBindingInfo(const std::string &layerName, const char *bindingPointDesc, const std::unordered_map< std::string, BindingPointInfo > &bindingInfos)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00296">CaffeParser.cpp:296</a></div></div> |
| 888 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a62d6d6cba9ed0d3ad63fffb40aec86b5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">armnnCaffeParser::CaffeParserBase::m_NetworkOutputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkOutputsBindingInfo</div><div class="ttdoc">maps output layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParser.hpp:124</a></div></div> |
| 889 | </div><!-- fragment --> |
| 890 | </div> |
| 891 | </div> |
| 892 | <a id="a9c5eed5d48d21a8b7e3bcd2cab519217"></a> |
| 893 | <h2 class="memtitle"><span class="permalink"><a href="#a9c5eed5d48d21a8b7e3bcd2cab519217">◆ </a></span>LoadNetParam()</h2> |
| 894 | |
| 895 | <div class="memitem"> |
| 896 | <div class="memproto"> |
| 897 | <table class="mlabels"> |
| 898 | <tr> |
| 899 | <td class="mlabels-left"> |
| 900 | <table class="memname"> |
| 901 | <tr> |
| 902 | <td class="memname">void LoadNetParam </td> |
| 903 | <td>(</td> |
| 904 | <td class="paramtype">caffe::NetParameter & </td> |
| 905 | <td class="paramname"><em>netParameter</em></td><td>)</td> |
| 906 | <td></td> |
| 907 | </tr> |
| 908 | </table> |
| 909 | </td> |
| 910 | <td class="mlabels-right"> |
| 911 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 912 | </tr> |
| 913 | </table> |
| 914 | </div><div class="memdoc"> |
| 915 | |
| 916 | <p>does the actual conversion from caffe::NetParameter to <a class="el" href="classarmnn_1_1_i_network.xhtml" title="Main network class which provides the interface for building up a neural network. ...">armnn::INetwork</a> </p> |
| 917 | |
| 918 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">1632</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 919 | |
| 920 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00339">CaffeParserBase::GetInputs()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParserBase::m_CaffeLayersByTopName</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParserBase::m_NetworkOutputsBindingInfo</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParserBase::m_RequestedOutputs</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00118">CaffeParserBase::ms_CaffeLayerNameToParsingFunctions</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01572">CaffeParserBase::ResolveInPlaceLayers()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01502">CaffeParserBase::TrackOutputBinding()</a>.</p> |
| 921 | |
| 922 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>.</p> |
| 923 | <div class="fragment"><div class="line"><a name="l01633"></a><span class="lineno"> 1633</span> {</div><div class="line"><a name="l01634"></a><span class="lineno"> 1634</span>  <span class="comment">// Caffe models sometimes have an implicit input layer.</span></div><div class="line"><a name="l01635"></a><span class="lineno"> 1635</span>  <span class="comment">// In that case, add an explicit one.</span></div><div class="line"><a name="l01636"></a><span class="lineno"> 1636</span>  <span class="keywordflow">if</span> (netParameter.input_size() > 0)</div><div class="line"><a name="l01637"></a><span class="lineno"> 1637</span>  {</div><div class="line"><a name="l01638"></a><span class="lineno"> 1638</span>  LayerParameter* newLayer = netParameter.add_layer();</div><div class="line"><a name="l01639"></a><span class="lineno"> 1639</span> </div><div class="line"><a name="l01640"></a><span class="lineno"> 1640</span>  newLayer->set_type(<span class="stringliteral">"Input"</span>);</div><div class="line"><a name="l01641"></a><span class="lineno"> 1641</span>  newLayer->set_name(netParameter.input(0));</div><div class="line"><a name="l01642"></a><span class="lineno"> 1642</span>  newLayer->add_top(netParameter.input(0));</div><div class="line"><a name="l01643"></a><span class="lineno"> 1643</span> </div><div class="line"><a name="l01644"></a><span class="lineno"> 1644</span>  InputParameter* inputParam = newLayer->mutable_input_param();</div><div class="line"><a name="l01645"></a><span class="lineno"> 1645</span>  BlobShape* shape = inputParam->add_shape();</div><div class="line"><a name="l01646"></a><span class="lineno"> 1646</span> </div><div class="line"><a name="l01647"></a><span class="lineno"> 1647</span>  <span class="keywordtype">int</span> dim_size = netParameter.input_dim_size();</div><div class="line"><a name="l01648"></a><span class="lineno"> 1648</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < dim_size; ++i)</div><div class="line"><a name="l01649"></a><span class="lineno"> 1649</span>  {</div><div class="line"><a name="l01650"></a><span class="lineno"> 1650</span>  shape->add_dim(netParameter.input_dim(i));</div><div class="line"><a name="l01651"></a><span class="lineno"> 1651</span>  }</div><div class="line"><a name="l01652"></a><span class="lineno"> 1652</span>  }</div><div class="line"><a name="l01653"></a><span class="lineno"> 1653</span> </div><div class="line"><a name="l01654"></a><span class="lineno"> 1654</span>  <span class="comment">// Replaces in-place layers with regular ones to make the rest of the parsing easier.</span></div><div class="line"><a name="l01655"></a><span class="lineno"> 1655</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a89631aa06b5c628c46674c202b40dbc5">ResolveInPlaceLayers</a>(netParameter);</div><div class="line"><a name="l01656"></a><span class="lineno"> 1656</span> </div><div class="line"><a name="l01657"></a><span class="lineno"> 1657</span>  <span class="comment">// Creates a lookup of Caffe layers by name.</span></div><div class="line"><a name="l01658"></a><span class="lineno"> 1658</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < netParameter.layer_size(); ++i)</div><div class="line"><a name="l01659"></a><span class="lineno"> 1659</span>  {</div><div class="line"><a name="l01660"></a><span class="lineno"> 1660</span>  <span class="keyword">const</span> caffe::LayerParameter& layer = netParameter.layer(i);</div><div class="line"><a name="l01661"></a><span class="lineno"> 1661</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < layer.top_size(); ++i)</div><div class="line"><a name="l01662"></a><span class="lineno"> 1662</span>  {</div><div class="line"><a name="l01663"></a><span class="lineno"> 1663</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>[layer.top(i)] = &layer;</div><div class="line"><a name="l01664"></a><span class="lineno"> 1664</span>  }</div><div class="line"><a name="l01665"></a><span class="lineno"> 1665</span>  }</div><div class="line"><a name="l01666"></a><span class="lineno"> 1666</span> </div><div class="line"><a name="l01667"></a><span class="lineno"> 1667</span>  <span class="comment">// Finds the output layers the user requested.</span></div><div class="line"><a name="l01668"></a><span class="lineno"> 1668</span>  std::vector<const caffe::LayerParameter*> targetLayers;</div><div class="line"><a name="l01669"></a><span class="lineno"> 1669</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& requestedOutputName : <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">m_RequestedOutputs</a>)</div><div class="line"><a name="l01670"></a><span class="lineno"> 1670</span>  {</div><div class="line"><a name="l01671"></a><span class="lineno"> 1671</span>  <span class="keyword">auto</span> nodeIt = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>.find(requestedOutputName);</div><div class="line"><a name="l01672"></a><span class="lineno"> 1672</span>  <span class="keywordflow">if</span> (nodeIt == <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">m_CaffeLayersByTopName</a>.end())</div><div class="line"><a name="l01673"></a><span class="lineno"> 1673</span>  {</div><div class="line"><a name="l01674"></a><span class="lineno"> 1674</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01675"></a><span class="lineno"> 1675</span>  boost::str(</div><div class="line"><a name="l01676"></a><span class="lineno"> 1676</span>  boost::format(</div><div class="line"><a name="l01677"></a><span class="lineno"> 1677</span>  <span class="stringliteral">"Couldn't find requested output layer '%1%' in graph %2%"</span>) %</div><div class="line"><a name="l01678"></a><span class="lineno"> 1678</span>  requestedOutputName %</div><div class="line"><a name="l01679"></a><span class="lineno"> 1679</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01680"></a><span class="lineno"> 1680</span>  }</div><div class="line"><a name="l01681"></a><span class="lineno"> 1681</span>  targetLayers.push_back(nodeIt->second);</div><div class="line"><a name="l01682"></a><span class="lineno"> 1682</span>  }</div><div class="line"><a name="l01683"></a><span class="lineno"> 1683</span> </div><div class="line"><a name="l01684"></a><span class="lineno"> 1684</span>  <span class="comment">// Sorts them into a linear ordering such that all inputs of a node are before the node itself.</span></div><div class="line"><a name="l01685"></a><span class="lineno"> 1685</span>  std::vector<const caffe::LayerParameter*> sortedNodes;</div><div class="line"><a name="l01686"></a><span class="lineno"> 1686</span>  <span class="keywordflow">if</span> (!armnnUtils::GraphTopologicalSort<const caffe::LayerParameter*>(</div><div class="line"><a name="l01687"></a><span class="lineno"> 1687</span>  targetLayers,</div><div class="line"><a name="l01688"></a><span class="lineno"> 1688</span>  [<span class="keyword">this</span>](<span class="keyword">const</span> caffe::LayerParameter* node)</div><div class="line"><a name="l01689"></a><span class="lineno"> 1689</span>  {</div><div class="line"><a name="l01690"></a><span class="lineno"> 1690</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2f8fbd66c1a39a06d61fcb6536387d64">GetInputs</a>(*node);</div><div class="line"><a name="l01691"></a><span class="lineno"> 1691</span>  },</div><div class="line"><a name="l01692"></a><span class="lineno"> 1692</span>  sortedNodes))</div><div class="line"><a name="l01693"></a><span class="lineno"> 1693</span>  {</div><div class="line"><a name="l01694"></a><span class="lineno"> 1694</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01695"></a><span class="lineno"> 1695</span>  boost::str(</div><div class="line"><a name="l01696"></a><span class="lineno"> 1696</span>  boost::format(</div><div class="line"><a name="l01697"></a><span class="lineno"> 1697</span>  <span class="stringliteral">"Cycle detected in graph. #nodes: %1% %2%"</span>) %</div><div class="line"><a name="l01698"></a><span class="lineno"> 1698</span>  sortedNodes.size() %</div><div class="line"><a name="l01699"></a><span class="lineno"> 1699</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01700"></a><span class="lineno"> 1700</span>  }</div><div class="line"><a name="l01701"></a><span class="lineno"> 1701</span> </div><div class="line"><a name="l01702"></a><span class="lineno"> 1702</span>  <span class="comment">// Parses each node in order, knowing that all inputs of a node will be processed before the node itself.</span></div><div class="line"><a name="l01703"></a><span class="lineno"> 1703</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> caffe::LayerParameter* current : sortedNodes)</div><div class="line"><a name="l01704"></a><span class="lineno"> 1704</span>  {</div><div class="line"><a name="l01705"></a><span class="lineno"> 1705</span>  <span class="keyword">auto</span> it = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a25a42793445e13200fae0040d7c7d993">ms_CaffeLayerNameToParsingFunctions</a>.find(current->type());</div><div class="line"><a name="l01706"></a><span class="lineno"> 1706</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a25a42793445e13200fae0040d7c7d993">ms_CaffeLayerNameToParsingFunctions</a>.end())</div><div class="line"><a name="l01707"></a><span class="lineno"> 1707</span>  {</div><div class="line"><a name="l01708"></a><span class="lineno"> 1708</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01709"></a><span class="lineno"> 1709</span>  boost::str(</div><div class="line"><a name="l01710"></a><span class="lineno"> 1710</span>  boost::format(<span class="stringliteral">"Unsupported layer type: '%1%' for layer %2% %3%"</span>) %</div><div class="line"><a name="l01711"></a><span class="lineno"> 1711</span>  current->type() %</div><div class="line"><a name="l01712"></a><span class="lineno"> 1712</span>  current->name() %</div><div class="line"><a name="l01713"></a><span class="lineno"> 1713</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01714"></a><span class="lineno"> 1714</span>  }</div><div class="line"><a name="l01715"></a><span class="lineno"> 1715</span>  <span class="keyword">auto</span> func = it->second;</div><div class="line"><a name="l01716"></a><span class="lineno"> 1716</span>  (this->*func)(*current);</div><div class="line"><a name="l01717"></a><span class="lineno"> 1717</span>  }</div><div class="line"><a name="l01718"></a><span class="lineno"> 1718</span> </div><div class="line"><a name="l01719"></a><span class="lineno"> 1719</span>  <span class="comment">// Adds ArmNN output layers connected to each requested output.</span></div><div class="line"><a name="l01720"></a><span class="lineno"> 1720</span>  <span class="keywordflow">for</span> (<span class="keyword">const</span> std::string& requestedOutput : m_RequestedOutputs)</div><div class="line"><a name="l01721"></a><span class="lineno"> 1721</span>  {</div><div class="line"><a name="l01722"></a><span class="lineno"> 1722</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& outputSlot = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(requestedOutput);</div><div class="line"><a name="l01723"></a><span class="lineno"> 1723</span> </div><div class="line"><a name="l01724"></a><span class="lineno"> 1724</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> outputId = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a>>(</div><div class="line"><a name="l01725"></a><span class="lineno"> 1725</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">m_NetworkOutputsBindingInfo</a>.size());</div><div class="line"><a name="l01726"></a><span class="lineno"> 1726</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* <span class="keyword">const</span> outputLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddOutputLayer(outputId, requestedOutput.c_str());</div><div class="line"><a name="l01727"></a><span class="lineno"> 1727</span>  outputSlot.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(outputLayer->GetInputSlot(0));</div><div class="line"><a name="l01728"></a><span class="lineno"> 1728</span> </div><div class="line"><a name="l01729"></a><span class="lineno"> 1729</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0c98e07875a82c71c65bbb53eb347561">TrackOutputBinding</a>(outputLayer, outputId, outputLayer->GetInputSlot(0).GetConnection()->GetTensorInfo());</div><div class="line"><a name="l01730"></a><span class="lineno"> 1730</span>  }</div><div class="line"><a name="l01731"></a><span class="lineno"> 1731</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 924 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 925 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a25a42793445e13200fae0040d7c7d993"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a25a42793445e13200fae0040d7c7d993">armnnCaffeParser::CaffeParserBase::ms_CaffeLayerNameToParsingFunctions</a></div><div class="ttdeci">static const std::map< std::string, OperationParsingFunction > ms_CaffeLayerNameToParsingFunctions</div><div class="ttdoc">Maps Caffe layer names to parsing member functions. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00118">CaffeParser.hpp:118</a></div></div> |
| 926 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a86cb41745deebd9b0ccf157d97d4d9ca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a86cb41745deebd9b0ccf157d97d4d9ca">armnnCaffeParser::CaffeParserBase::m_RequestedOutputs</a></div><div class="ttdeci">std::vector< std::string > m_RequestedOutputs</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00133">CaffeParser.hpp:133</a></div></div> |
| 927 | <div class="ttc" id="namespacearmnn_xhtml_ab8cf8f9fb6792e654c2d8d8382f6f01b"><div class="ttname"><a href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a></div><div class="ttdeci">int LayerBindingId</div><div class="ttdoc">Type of identifiers for bindable layers (inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00171">Types.hpp:171</a></div></div> |
| 928 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0c98e07875a82c71c65bbb53eb347561"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0c98e07875a82c71c65bbb53eb347561">armnnCaffeParser::CaffeParserBase::TrackOutputBinding</a></div><div class="ttdeci">void TrackOutputBinding(armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01502">CaffeParser.cpp:1502</a></div></div> |
| 929 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a89631aa06b5c628c46674c202b40dbc5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a89631aa06b5c628c46674c202b40dbc5">armnnCaffeParser::CaffeParserBase::ResolveInPlaceLayers</a></div><div class="ttdeci">void ResolveInPlaceLayers(caffe::NetParameter &netParameter)</div><div class="ttdoc">Modifies the Caffe network to replace "in-place" layers (whose top() and bottom() are both the same) ...</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01572">CaffeParser.cpp:1572</a></div></div> |
| 930 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 931 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 932 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a62d6d6cba9ed0d3ad63fffb40aec86b5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">armnnCaffeParser::CaffeParserBase::m_NetworkOutputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkOutputsBindingInfo</div><div class="ttdoc">maps output layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParser.hpp:124</a></div></div> |
| 933 | <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> |
| 934 | <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> |
| 935 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2f8fbd66c1a39a06d61fcb6536387d64"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2f8fbd66c1a39a06d61fcb6536387d64">armnnCaffeParser::CaffeParserBase::GetInputs</a></div><div class="ttdeci">std::vector< const caffe::LayerParameter * > GetInputs(const caffe::LayerParameter &layerParam)</div><div class="ttdoc">Find the Caffe layers listed as inputs (bottoms) for a given layer. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00339">CaffeParser.cpp:339</a></div></div> |
| 936 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 937 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a1424f1bfbfc81d317b51053bbb315ef1"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1424f1bfbfc81d317b51053bbb315ef1">armnnCaffeParser::CaffeParserBase::m_CaffeLayersByTopName</a></div><div class="ttdeci">std::map< std::string, const caffe::LayerParameter * > m_CaffeLayersByTopName</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00139">CaffeParser.hpp:139</a></div></div> |
| 938 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 939 | </div><!-- fragment --> |
| 940 | </div> |
| 941 | </div> |
| 942 | <a id="a940483591995bb812cfcd1595dba83c3"></a> |
| 943 | <h2 class="memtitle"><span class="permalink"><a href="#a940483591995bb812cfcd1595dba83c3">◆ </a></span>ParseBatchNormLayer()</h2> |
| 944 | |
| 945 | <div class="memitem"> |
| 946 | <div class="memproto"> |
| 947 | <table class="mlabels"> |
| 948 | <tr> |
| 949 | <td class="mlabels-left"> |
| 950 | <table class="memname"> |
| 951 | <tr> |
| 952 | <td class="memname">void ParseBatchNormLayer </td> |
| 953 | <td>(</td> |
| 954 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 955 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 956 | <td></td> |
| 957 | </tr> |
| 958 | </table> |
| 959 | </td> |
| 960 | <td class="mlabels-right"> |
| 961 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 962 | </tr> |
| 963 | </table> |
| 964 | </div><div class="memdoc"> |
| 965 | |
| 966 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01338">1338</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 967 | |
| 968 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00623">BatchNormalizationDescriptor::m_Eps</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 969 | <div class="fragment"><div class="line"><a name="l01339"></a><span class="lineno"> 1339</span> {</div><div class="line"><a name="l01340"></a><span class="lineno"> 1340</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01341"></a><span class="lineno"> 1341</span> </div><div class="line"><a name="l01342"></a><span class="lineno"> 1342</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01343"></a><span class="lineno"> 1343</span> </div><div class="line"><a name="l01344"></a><span class="lineno"> 1344</span>  <span class="keywordtype">string</span> name = layerParam.name();</div><div class="line"><a name="l01345"></a><span class="lineno"> 1345</span> </div><div class="line"><a name="l01346"></a><span class="lineno"> 1346</span>  BatchNormParameter param = layerParam.batch_norm_param();</div><div class="line"><a name="l01347"></a><span class="lineno"> 1347</span>  <span class="comment">// If use_global_stats is not explicitly set in the model, assume it to be true (its default value</span></div><div class="line"><a name="l01348"></a><span class="lineno"> 1348</span>  <span class="comment">// when the network is in the testing phase).</span></div><div class="line"><a name="l01349"></a><span class="lineno"> 1349</span>  <span class="keywordflow">if</span> (param.has_use_global_stats())</div><div class="line"><a name="l01350"></a><span class="lineno"> 1350</span>  {</div><div class="line"><a name="l01351"></a><span class="lineno"> 1351</span>  <span class="keywordflow">if</span> (!param.use_global_stats())</div><div class="line"><a name="l01352"></a><span class="lineno"> 1352</span>  {</div><div class="line"><a name="l01353"></a><span class="lineno"> 1353</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01354"></a><span class="lineno"> 1354</span>  boost::str(</div><div class="line"><a name="l01355"></a><span class="lineno"> 1355</span>  boost::format(</div><div class="line"><a name="l01356"></a><span class="lineno"> 1356</span>  <span class="stringliteral">"Error parsing Batch Norm layer '%1%': "</span></div><div class="line"><a name="l01357"></a><span class="lineno"> 1357</span>  <span class="stringliteral">"Parameter 'use_global_stats' is set to false, which is "</span></div><div class="line"><a name="l01358"></a><span class="lineno"> 1358</span>  <span class="stringliteral">"unsupported (value used for training). %2%"</span>) %</div><div class="line"><a name="l01359"></a><span class="lineno"> 1359</span>  name %</div><div class="line"><a name="l01360"></a><span class="lineno"> 1360</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01361"></a><span class="lineno"> 1361</span>  }</div><div class="line"><a name="l01362"></a><span class="lineno"> 1362</span>  }</div><div class="line"><a name="l01363"></a><span class="lineno"> 1363</span> </div><div class="line"><a name="l01364"></a><span class="lineno"> 1364</span>  <a class="code" href="structarmnn_1_1_batch_normalization_descriptor.xhtml">BatchNormalizationDescriptor</a> desc;</div><div class="line"><a name="l01365"></a><span class="lineno"> 1365</span>  desc.<a class="code" href="structarmnn_1_1_batch_normalization_descriptor.xhtml#a11c821c7524251004a72ed13c510853c">m_Eps</a> = param.eps();</div><div class="line"><a name="l01366"></a><span class="lineno"> 1366</span> </div><div class="line"><a name="l01367"></a><span class="lineno"> 1367</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l01368"></a><span class="lineno"> 1368</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> shape[] = {channels};</div><div class="line"><a name="l01369"></a><span class="lineno"> 1369</span> </div><div class="line"><a name="l01370"></a><span class="lineno"> 1370</span>  vector<float> meanData(channels);</div><div class="line"><a name="l01371"></a><span class="lineno"> 1371</span>  GetDataFromBlob(layerParam, meanData, 0);</div><div class="line"><a name="l01372"></a><span class="lineno"> 1372</span> </div><div class="line"><a name="l01373"></a><span class="lineno"> 1373</span>  vector<float> varianceData(channels);</div><div class="line"><a name="l01374"></a><span class="lineno"> 1374</span>  GetDataFromBlob(layerParam, varianceData, 1);</div><div class="line"><a name="l01375"></a><span class="lineno"> 1375</span> </div><div class="line"><a name="l01376"></a><span class="lineno"> 1376</span>  <span class="comment">// Reads moving average factor and applies scaling (if required).</span></div><div class="line"><a name="l01377"></a><span class="lineno"> 1377</span>  <span class="keyword">const</span> BlobProto& blob = layerParam.blobs(boost::numeric_cast<int>(2));</div><div class="line"><a name="l01378"></a><span class="lineno"> 1378</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> movingAverageFactor = blob.data(boost::numeric_cast<int>(0));</div><div class="line"><a name="l01379"></a><span class="lineno"> 1379</span>  <span class="keywordflow">if</span>(movingAverageFactor != 0.0f)</div><div class="line"><a name="l01380"></a><span class="lineno"> 1380</span>  {</div><div class="line"><a name="l01381"></a><span class="lineno"> 1381</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> scaleFactor = 1.0f / movingAverageFactor;</div><div class="line"><a name="l01382"></a><span class="lineno"> 1382</span>  <span class="keyword">auto</span> scaleFunction = [scaleFactor](<span class="keywordtype">float</span> f) -> <span class="keywordtype">float</span> { <span class="keywordflow">return</span> f * scaleFactor; };</div><div class="line"><a name="l01383"></a><span class="lineno"> 1383</span> </div><div class="line"><a name="l01384"></a><span class="lineno"> 1384</span>  std::transform(varianceData.begin(), varianceData.end(), varianceData.begin(), scaleFunction);</div><div class="line"><a name="l01385"></a><span class="lineno"> 1385</span>  std::transform(meanData.begin(), meanData.end(), meanData.begin(), scaleFunction);</div><div class="line"><a name="l01386"></a><span class="lineno"> 1386</span>  }</div><div class="line"><a name="l01387"></a><span class="lineno"> 1387</span> </div><div class="line"><a name="l01388"></a><span class="lineno"> 1388</span>  <span class="comment">// Identifies scale operation.</span></div><div class="line"><a name="l01389"></a><span class="lineno"> 1389</span>  vector<float> betaData(channels, 0.0f);</div><div class="line"><a name="l01390"></a><span class="lineno"> 1390</span>  vector<float> gammaData(channels, 1.0f);</div><div class="line"><a name="l01391"></a><span class="lineno"> 1391</span> </div><div class="line"><a name="l01392"></a><span class="lineno"> 1392</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> mean(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), meanData);</div><div class="line"><a name="l01393"></a><span class="lineno"> 1393</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> variance(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), varianceData);</div><div class="line"><a name="l01394"></a><span class="lineno"> 1394</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> beta(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), betaData);</div><div class="line"><a name="l01395"></a><span class="lineno"> 1395</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> gamma(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), gammaData);</div><div class="line"><a name="l01396"></a><span class="lineno"> 1396</span> </div><div class="line"><a name="l01397"></a><span class="lineno"> 1397</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* <span class="keyword">const</span> batchNormLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddBatchNormalizationLayer(desc,</div><div class="line"><a name="l01398"></a><span class="lineno"> 1398</span>  mean, variance, beta, gamma, name.c_str());</div><div class="line"><a name="l01399"></a><span class="lineno"> 1399</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01400"></a><span class="lineno"> 1400</span>  batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01401"></a><span class="lineno"> 1401</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01402"></a><span class="lineno"> 1402</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 970 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 971 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 972 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 973 | <div class="ttc" id="structarmnn_1_1_batch_normalization_descriptor_xhtml_a11c821c7524251004a72ed13c510853c"><div class="ttname"><a href="structarmnn_1_1_batch_normalization_descriptor.xhtml#a11c821c7524251004a72ed13c510853c">armnn::BatchNormalizationDescriptor::m_Eps</a></div><div class="ttdeci">float m_Eps</div><div class="ttdoc">Value to add to the variance. Used to avoid dividing by zero. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00623">Descriptors.hpp:623</a></div></div> |
| 974 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 975 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 976 | <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> |
| 977 | <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> |
| 978 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 979 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 980 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 981 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 982 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 983 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 984 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 985 | <div class="ttc" id="structarmnn_1_1_batch_normalization_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_batch_normalization_descriptor.xhtml">armnn::BatchNormalizationDescriptor</a></div><div class="ttdoc">A BatchNormalizationDescriptor for the BatchNormalizationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00610">Descriptors.hpp:610</a></div></div> |
| 986 | </div><!-- fragment --> |
| 987 | </div> |
| 988 | </div> |
| 989 | <a id="aa0f0ff1cae05c1a0d7cc11b498714312"></a> |
| 990 | <h2 class="memtitle"><span class="permalink"><a href="#aa0f0ff1cae05c1a0d7cc11b498714312">◆ </a></span>ParseConcatLayer()</h2> |
| 991 | |
| 992 | <div class="memitem"> |
| 993 | <div class="memproto"> |
| 994 | <table class="mlabels"> |
| 995 | <tr> |
| 996 | <td class="mlabels-left"> |
| 997 | <table class="memname"> |
| 998 | <tr> |
| 999 | <td class="memname">void ParseConcatLayer </td> |
| 1000 | <td>(</td> |
| 1001 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1002 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1003 | <td></td> |
| 1004 | </tr> |
| 1005 | </table> |
| 1006 | </td> |
| 1007 | <td class="mlabels-right"> |
| 1008 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1009 | </tr> |
| 1010 | </table> |
| 1011 | </div><div class="memdoc"> |
| 1012 | |
| 1013 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01277">1277</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1014 | |
| 1015 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>, and <a class="el" href="_descriptors_8cpp_source.xhtml#l00159">OriginsDescriptor::SetViewOriginCoord()</a>.</p> |
| 1016 | <div class="fragment"><div class="line"><a name="l01278"></a><span class="lineno"> 1278</span> {</div><div class="line"><a name="l01279"></a><span class="lineno"> 1279</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numInputs = <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(layerParam.bottom_size());</div><div class="line"><a name="l01280"></a><span class="lineno"> 1280</span>  <span class="comment">// We assume concat happens along the channel dimension, which is 1 in (0, 1, 2, 3).</span></div><div class="line"><a name="l01281"></a><span class="lineno"> 1281</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> concatDim = 1;</div><div class="line"><a name="l01282"></a><span class="lineno"> 1282</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numOfDims = 4;</div><div class="line"><a name="l01283"></a><span class="lineno"> 1283</span> </div><div class="line"><a name="l01284"></a><span class="lineno"> 1284</span>  <span class="comment">// we only consider 4-D tensor here</span></div><div class="line"><a name="l01285"></a><span class="lineno"> 1285</span>  <a class="code" href="structarmnn_1_1_origins_descriptor.xhtml">OriginsDescriptor</a> concatDescriptor(static_cast<uint32_t>(numInputs), numOfDims);</div><div class="line"><a name="l01286"></a><span class="lineno"> 1286</span>  std::vector<unsigned int>mergeDimSizes(numOfDims, 0u);</div><div class="line"><a name="l01287"></a><span class="lineno"> 1287</span> </div><div class="line"><a name="l01288"></a><span class="lineno"> 1288</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mergeDim = 0;</div><div class="line"><a name="l01289"></a><span class="lineno"> 1289</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> viewIndex = 0; viewIndex < numInputs; ++viewIndex)</div><div class="line"><a name="l01290"></a><span class="lineno"> 1290</span>  {</div><div class="line"><a name="l01291"></a><span class="lineno"> 1291</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(</div><div class="line"><a name="l01292"></a><span class="lineno"> 1292</span>  layerParam.bottom(boost::numeric_cast<int>(viewIndex))).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01293"></a><span class="lineno"> 1293</span>  <span class="comment">// Checks whether the dimensions of the input tensors are actually 4.</span></div><div class="line"><a name="l01294"></a><span class="lineno"> 1294</span>  <span class="keywordflow">if</span> (inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>()!=4)</div><div class="line"><a name="l01295"></a><span class="lineno"> 1295</span>  {</div><div class="line"><a name="l01296"></a><span class="lineno"> 1296</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01297"></a><span class="lineno"> 1297</span>  boost::str(</div><div class="line"><a name="l01298"></a><span class="lineno"> 1298</span>  boost::format(</div><div class="line"><a name="l01299"></a><span class="lineno"> 1299</span>  <span class="stringliteral">"The number of dimensions for input tensors of "</span></div><div class="line"><a name="l01300"></a><span class="lineno"> 1300</span>  <span class="stringliteral">"the concatenation op should be 4. Inputs of %1% has "</span></div><div class="line"><a name="l01301"></a><span class="lineno"> 1301</span>  <span class="stringliteral">"%2% dimensions. %3%"</span>) %</div><div class="line"><a name="l01302"></a><span class="lineno"> 1302</span>  layerParam.name() %</div><div class="line"><a name="l01303"></a><span class="lineno"> 1303</span>  inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>() %</div><div class="line"><a name="l01304"></a><span class="lineno"> 1304</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01305"></a><span class="lineno"> 1305</span>  }</div><div class="line"><a name="l01306"></a><span class="lineno"> 1306</span> </div><div class="line"><a name="l01307"></a><span class="lineno"> 1307</span>  mergeDimSizes[0] = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[0];</div><div class="line"><a name="l01308"></a><span class="lineno"> 1308</span>  mergeDimSizes[1] = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l01309"></a><span class="lineno"> 1309</span>  mergeDimSizes[2] = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[2];</div><div class="line"><a name="l01310"></a><span class="lineno"> 1310</span>  mergeDimSizes[3] = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[3];</div><div class="line"><a name="l01311"></a><span class="lineno"> 1311</span> </div><div class="line"><a name="l01312"></a><span class="lineno"> 1312</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = 0; j < concatDim; ++j)</div><div class="line"><a name="l01313"></a><span class="lineno"> 1313</span>  {</div><div class="line"><a name="l01314"></a><span class="lineno"> 1314</span>  concatDescriptor.SetViewOriginCoord(viewIndex, j, 0);</div><div class="line"><a name="l01315"></a><span class="lineno"> 1315</span>  }</div><div class="line"><a name="l01316"></a><span class="lineno"> 1316</span> </div><div class="line"><a name="l01317"></a><span class="lineno"> 1317</span>  concatDescriptor.SetViewOriginCoord(viewIndex, concatDim, mergeDim);</div><div class="line"><a name="l01318"></a><span class="lineno"> 1318</span>  mergeDim += mergeDimSizes[concatDim];</div><div class="line"><a name="l01319"></a><span class="lineno"> 1319</span> </div><div class="line"><a name="l01320"></a><span class="lineno"> 1320</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> j = concatDim+1; j < numOfDims; ++j)</div><div class="line"><a name="l01321"></a><span class="lineno"> 1321</span>  {</div><div class="line"><a name="l01322"></a><span class="lineno"> 1322</span>  concatDescriptor.SetViewOriginCoord(viewIndex, j, 0);</div><div class="line"><a name="l01323"></a><span class="lineno"> 1323</span>  }</div><div class="line"><a name="l01324"></a><span class="lineno"> 1324</span>  }</div><div class="line"><a name="l01325"></a><span class="lineno"> 1325</span>  mergeDimSizes[concatDim] = mergeDim;</div><div class="line"><a name="l01326"></a><span class="lineno"> 1326</span> </div><div class="line"><a name="l01327"></a><span class="lineno"> 1327</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* concatlayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddConcatLayer(concatDescriptor, layerParam.name().c_str());</div><div class="line"><a name="l01328"></a><span class="lineno"> 1328</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 0; i < numInputs; ++i)</div><div class="line"><a name="l01329"></a><span class="lineno"> 1329</span>  {</div><div class="line"><a name="l01330"></a><span class="lineno"> 1330</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& outputSlot = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(boost::numeric_cast<int>(i)));</div><div class="line"><a name="l01331"></a><span class="lineno"> 1331</span>  outputSlot.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(concatlayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(i));</div><div class="line"><a name="l01332"></a><span class="lineno"> 1332</span>  }</div><div class="line"><a name="l01333"></a><span class="lineno"> 1333</span> </div><div class="line"><a name="l01334"></a><span class="lineno"> 1334</span>  concatlayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a>(numOfDims, mergeDimSizes.data(), DataType::Float32));</div><div class="line"><a name="l01335"></a><span class="lineno"> 1335</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), concatlayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01336"></a><span class="lineno"> 1336</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1017 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 1018 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1019 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1020 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1021 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 1022 | <div class="ttc" id="structarmnn_1_1_origins_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_origins_descriptor.xhtml">armnn::OriginsDescriptor</a></div><div class="ttdoc">An OriginsDescriptor for the ConcatLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00147">Descriptors.hpp:147</a></div></div> |
| 1023 | <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> |
| 1024 | <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> |
| 1025 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1026 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1027 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1028 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 1029 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1030 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div> |
| 1031 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1032 | </div><!-- fragment --> |
| 1033 | </div> |
| 1034 | </div> |
| 1035 | <a id="a5cddc80538d5de7d36192e0fd2d09c63"></a> |
| 1036 | <h2 class="memtitle"><span class="permalink"><a href="#a5cddc80538d5de7d36192e0fd2d09c63">◆ </a></span>ParseConvLayer()</h2> |
| 1037 | |
| 1038 | <div class="memitem"> |
| 1039 | <div class="memproto"> |
| 1040 | <table class="mlabels"> |
| 1041 | <tr> |
| 1042 | <td class="mlabels-left"> |
| 1043 | <table class="memname"> |
| 1044 | <tr> |
| 1045 | <td class="memname">void ParseConvLayer </td> |
| 1046 | <td>(</td> |
| 1047 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1048 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1049 | <td></td> |
| 1050 | </tr> |
| 1051 | </table> |
| 1052 | </td> |
| 1053 | <td class="mlabels-right"> |
| 1054 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1055 | </tr> |
| 1056 | </table> |
| 1057 | </div><div class="memdoc"> |
| 1058 | |
| 1059 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">701</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1060 | |
| 1061 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParserBase::AddConvLayerWithDepthwiseConv()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParserBase::AddConvLayerWithSplits()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParserBase::BlobShapeToTensorInfo()</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">IOutputSlot::Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00176">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00438">Convolution2dDescriptor::m_BiasEnabled</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00428">Convolution2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00422">Convolution2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00424">Convolution2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00426">Convolution2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00430">Convolution2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00432">Convolution2dDescriptor::m_StrideY</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00325">armnnCaffeParser::TensorDescToBlobShape()</a>.</p> |
| 1062 | <div class="fragment"><div class="line"><a name="l00702"></a><span class="lineno"> 702</span> {</div><div class="line"><a name="l00703"></a><span class="lineno"> 703</span>  <span class="comment">// Ignored Caffe Parameters</span></div><div class="line"><a name="l00704"></a><span class="lineno"> 704</span>  <span class="comment">// * Dilation Size</span></div><div class="line"><a name="l00705"></a><span class="lineno"> 705</span>  <span class="comment">// * Weight Filler</span></div><div class="line"><a name="l00706"></a><span class="lineno"> 706</span>  <span class="comment">// * Bias Filler</span></div><div class="line"><a name="l00707"></a><span class="lineno"> 707</span>  <span class="comment">// * Engine</span></div><div class="line"><a name="l00708"></a><span class="lineno"> 708</span>  <span class="comment">// * Force nd_im2col</span></div><div class="line"><a name="l00709"></a><span class="lineno"> 709</span>  <span class="comment">// * Axis</span></div><div class="line"><a name="l00710"></a><span class="lineno"> 710</span> </div><div class="line"><a name="l00711"></a><span class="lineno"> 711</span>  <span class="comment">// Not Available ArmNN Interface Parameters</span></div><div class="line"><a name="l00712"></a><span class="lineno"> 712</span>  <span class="comment">// * Rounding policy;</span></div><div class="line"><a name="l00713"></a><span class="lineno"> 713</span> </div><div class="line"><a name="l00714"></a><span class="lineno"> 714</span>  BOOST_ASSERT(layerParam.type() == <span class="stringliteral">"Convolution"</span>);</div><div class="line"><a name="l00715"></a><span class="lineno"> 715</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l00716"></a><span class="lineno"> 716</span> </div><div class="line"><a name="l00717"></a><span class="lineno"> 717</span>  ConvolutionParameter convParam = layerParam.convolution_param();</div><div class="line"><a name="l00718"></a><span class="lineno"> 718</span>  BlobShape inputShape = <a class="code" href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">TensorDescToBlobShape</a>(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>());</div><div class="line"><a name="l00719"></a><span class="lineno"> 719</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numGroups = convParam.has_group() ? convParam.group() : 1;</div><div class="line"><a name="l00720"></a><span class="lineno"> 720</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> numFilters = convParam.num_output();</div><div class="line"><a name="l00721"></a><span class="lineno"> 721</span> </div><div class="line"><a name="l00722"></a><span class="lineno"> 722</span>  <span class="keyword">const</span> <span class="keyword">auto</span> notFound = std::numeric_limits<unsigned int>::max();</div><div class="line"><a name="l00723"></a><span class="lineno"> 723</span> </div><div class="line"><a name="l00724"></a><span class="lineno"> 724</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> kernelH = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00725"></a><span class="lineno"> 725</span>  kernel_h, kernel_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00726"></a><span class="lineno"> 726</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> kernelW = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00727"></a><span class="lineno"> 727</span>  kernel_w, kernel_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00728"></a><span class="lineno"> 728</span> </div><div class="line"><a name="l00729"></a><span class="lineno"> 729</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> strideH = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00730"></a><span class="lineno"> 730</span>  stride_h, stride, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 1u);</div><div class="line"><a name="l00731"></a><span class="lineno"> 731</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> strideW = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00732"></a><span class="lineno"> 732</span>  stride_w, stride, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 1u);</div><div class="line"><a name="l00733"></a><span class="lineno"> 733</span> </div><div class="line"><a name="l00734"></a><span class="lineno"> 734</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> padH = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00735"></a><span class="lineno"> 735</span>  pad_h, pad, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 0u);</div><div class="line"><a name="l00736"></a><span class="lineno"> 736</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> padW = <a class="code" href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a>(convParam, ConvolutionParameter,</div><div class="line"><a name="l00737"></a><span class="lineno"> 737</span>  pad_w, pad, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 0u);</div><div class="line"><a name="l00738"></a><span class="lineno"> 738</span> </div><div class="line"><a name="l00739"></a><span class="lineno"> 739</span>  <a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml">Convolution2dDescriptor</a> convolution2dDescriptor;</div><div class="line"><a name="l00740"></a><span class="lineno"> 740</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">m_PadLeft</a> = padW;</div><div class="line"><a name="l00741"></a><span class="lineno"> 741</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">m_PadRight</a> = padW;</div><div class="line"><a name="l00742"></a><span class="lineno"> 742</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#a56b51f56cef50cdfa554258eecdab046">m_PadTop</a> = padH;</div><div class="line"><a name="l00743"></a><span class="lineno"> 743</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">m_PadBottom</a> = padH;</div><div class="line"><a name="l00744"></a><span class="lineno"> 744</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">m_StrideX</a> = strideW;</div><div class="line"><a name="l00745"></a><span class="lineno"> 745</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">m_StrideY</a> = strideH;</div><div class="line"><a name="l00746"></a><span class="lineno"> 746</span>  convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a> = convParam.has_bias_term() ? convParam.bias_term() : <span class="keyword">true</span>;</div><div class="line"><a name="l00747"></a><span class="lineno"> 747</span> </div><div class="line"><a name="l00748"></a><span class="lineno"> 748</span>  <span class="keywordflow">if</span> (numGroups > numFilters)</div><div class="line"><a name="l00749"></a><span class="lineno"> 749</span>  {</div><div class="line"><a name="l00750"></a><span class="lineno"> 750</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00751"></a><span class="lineno"> 751</span>  boost::str(</div><div class="line"><a name="l00752"></a><span class="lineno"> 752</span>  boost::format(</div><div class="line"><a name="l00753"></a><span class="lineno"> 753</span>  <span class="stringliteral">"Error parsing Convolution: %1%. "</span></div><div class="line"><a name="l00754"></a><span class="lineno"> 754</span>  <span class="stringliteral">"The 'group'=%2% parameter cannot be larger than the "</span></div><div class="line"><a name="l00755"></a><span class="lineno"> 755</span>  <span class="stringliteral">"number of filters supplied ='%3%'. %4%"</span>) %</div><div class="line"><a name="l00756"></a><span class="lineno"> 756</span>  layerParam.name() %</div><div class="line"><a name="l00757"></a><span class="lineno"> 757</span>  numGroups %</div><div class="line"><a name="l00758"></a><span class="lineno"> 758</span>  numFilters %</div><div class="line"><a name="l00759"></a><span class="lineno"> 759</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00760"></a><span class="lineno"> 760</span>  }</div><div class="line"><a name="l00761"></a><span class="lineno"> 761</span> </div><div class="line"><a name="l00762"></a><span class="lineno"> 762</span>  <span class="keywordflow">if</span> (inputShape.dim_size() != 4)</div><div class="line"><a name="l00763"></a><span class="lineno"> 763</span>  {</div><div class="line"><a name="l00764"></a><span class="lineno"> 764</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00765"></a><span class="lineno"> 765</span>  boost::str(</div><div class="line"><a name="l00766"></a><span class="lineno"> 766</span>  boost::format(</div><div class="line"><a name="l00767"></a><span class="lineno"> 767</span>  <span class="stringliteral">"Convolution input shape is expected to have 4 dimensions. "</span></div><div class="line"><a name="l00768"></a><span class="lineno"> 768</span>  <span class="stringliteral">"%1%'s input has only %2%. %3%"</span>) %</div><div class="line"><a name="l00769"></a><span class="lineno"> 769</span>  layerParam.name() %</div><div class="line"><a name="l00770"></a><span class="lineno"> 770</span>  inputShape.dim_size() %</div><div class="line"><a name="l00771"></a><span class="lineno"> 771</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00772"></a><span class="lineno"> 772</span>  }</div><div class="line"><a name="l00773"></a><span class="lineno"> 773</span> </div><div class="line"><a name="l00774"></a><span class="lineno"> 774</span>  <span class="keywordflow">if</span> (numGroups > 1)</div><div class="line"><a name="l00775"></a><span class="lineno"> 775</span>  {</div><div class="line"><a name="l00776"></a><span class="lineno"> 776</span>  <span class="keywordflow">if</span> (numGroups > inputShape.dim(1))</div><div class="line"><a name="l00777"></a><span class="lineno"> 777</span>  {</div><div class="line"><a name="l00778"></a><span class="lineno"> 778</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00779"></a><span class="lineno"> 779</span>  boost::str(</div><div class="line"><a name="l00780"></a><span class="lineno"> 780</span>  boost::format(</div><div class="line"><a name="l00781"></a><span class="lineno"> 781</span>  <span class="stringliteral">"Error parsing Convolution: %1%. "</span></div><div class="line"><a name="l00782"></a><span class="lineno"> 782</span>  <span class="stringliteral">"The 'group'=%2% parameter cannot be larger than the "</span></div><div class="line"><a name="l00783"></a><span class="lineno"> 783</span>  <span class="stringliteral">"channel of the input shape=%3% (in NCHW format). %4%"</span>) %</div><div class="line"><a name="l00784"></a><span class="lineno"> 784</span>  layerParam.name() %</div><div class="line"><a name="l00785"></a><span class="lineno"> 785</span>  numGroups %</div><div class="line"><a name="l00786"></a><span class="lineno"> 786</span>  inputShape.dim(1) %</div><div class="line"><a name="l00787"></a><span class="lineno"> 787</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00788"></a><span class="lineno"> 788</span>  }</div><div class="line"><a name="l00789"></a><span class="lineno"> 789</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (numGroups == inputShape.dim(1))</div><div class="line"><a name="l00790"></a><span class="lineno"> 790</span>  {</div><div class="line"><a name="l00791"></a><span class="lineno"> 791</span>  <span class="comment">// we use a depthwise convolution here, because the number of groups equals to the</span></div><div class="line"><a name="l00792"></a><span class="lineno"> 792</span>  <span class="comment">// input channels</span></div><div class="line"><a name="l00793"></a><span class="lineno"> 793</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#adcb87456482d5df17ef09eca1a808091">AddConvLayerWithDepthwiseConv</a>(layerParam, convolution2dDescriptor, kernelW, kernelH);</div><div class="line"><a name="l00794"></a><span class="lineno"> 794</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00795"></a><span class="lineno"> 795</span>  }</div><div class="line"><a name="l00796"></a><span class="lineno"> 796</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00797"></a><span class="lineno"> 797</span>  {</div><div class="line"><a name="l00798"></a><span class="lineno"> 798</span>  <span class="comment">// we split the input by channels into channels/groups separate convolutions</span></div><div class="line"><a name="l00799"></a><span class="lineno"> 799</span>  <span class="comment">// and concatenate the results afterwards</span></div><div class="line"><a name="l00800"></a><span class="lineno"> 800</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9fea304829fe514d664de515ca5c3918">AddConvLayerWithSplits</a>(layerParam, convolution2dDescriptor, kernelW, kernelH);</div><div class="line"><a name="l00801"></a><span class="lineno"> 801</span>  <span class="keywordflow">return</span>;</div><div class="line"><a name="l00802"></a><span class="lineno"> 802</span>  }</div><div class="line"><a name="l00803"></a><span class="lineno"> 803</span>  }</div><div class="line"><a name="l00804"></a><span class="lineno"> 804</span> </div><div class="line"><a name="l00805"></a><span class="lineno"> 805</span>  <span class="comment">// NOTE: at this point we only need to handle #group=1 case, all other cases should be</span></div><div class="line"><a name="l00806"></a><span class="lineno"> 806</span>  <span class="comment">// handled by the AddConvLayer* helpers</span></div><div class="line"><a name="l00807"></a><span class="lineno"> 807</span> </div><div class="line"><a name="l00808"></a><span class="lineno"> 808</span>  <span class="comment">// Populate convolution output tensor descriptor dimensions</span></div><div class="line"><a name="l00809"></a><span class="lineno"> 809</span>  BlobShape outputShape;</div><div class="line"><a name="l00810"></a><span class="lineno"> 810</span>  outputShape.add_dim(0);</div><div class="line"><a name="l00811"></a><span class="lineno"> 811</span>  outputShape.set_dim(0, inputShape.dim(0));</div><div class="line"><a name="l00812"></a><span class="lineno"> 812</span>  outputShape.add_dim(1);</div><div class="line"><a name="l00813"></a><span class="lineno"> 813</span>  outputShape.set_dim(1, numFilters);</div><div class="line"><a name="l00814"></a><span class="lineno"> 814</span>  outputShape.add_dim(2);</div><div class="line"><a name="l00815"></a><span class="lineno"> 815</span>  outputShape.set_dim(</div><div class="line"><a name="l00816"></a><span class="lineno"> 816</span>  2, (static_cast<int>(</div><div class="line"><a name="l00817"></a><span class="lineno"> 817</span>  static_cast<float>(inputShape.dim(2) + 2 * padH - kernelH) /</div><div class="line"><a name="l00818"></a><span class="lineno"> 818</span>  static_cast<float>(strideH)) + 1));</div><div class="line"><a name="l00819"></a><span class="lineno"> 819</span>  outputShape.add_dim(3);</div><div class="line"><a name="l00820"></a><span class="lineno"> 820</span>  outputShape.set_dim(</div><div class="line"><a name="l00821"></a><span class="lineno"> 821</span>  3, (static_cast<int>(</div><div class="line"><a name="l00822"></a><span class="lineno"> 822</span>  static_cast<float>(inputShape.dim(3) + 2 * padW - kernelW) /</div><div class="line"><a name="l00823"></a><span class="lineno"> 823</span>  static_cast<float>(strideW)) + 1));</div><div class="line"><a name="l00824"></a><span class="lineno"> 824</span> </div><div class="line"><a name="l00825"></a><span class="lineno"> 825</span>  <span class="comment">// Load the weight data for ALL groups</span></div><div class="line"><a name="l00826"></a><span class="lineno"> 826</span>  vector<float> weightData(boost::numeric_cast<size_t>(inputShape.dim(1) *</div><div class="line"><a name="l00827"></a><span class="lineno"> 827</span>  outputShape.dim(1) *</div><div class="line"><a name="l00828"></a><span class="lineno"> 828</span>  kernelH *</div><div class="line"><a name="l00829"></a><span class="lineno"> 829</span>  kernelW));</div><div class="line"><a name="l00830"></a><span class="lineno"> 830</span>  GetDataFromBlob(layerParam, weightData, 0);</div><div class="line"><a name="l00831"></a><span class="lineno"> 831</span> </div><div class="line"><a name="l00832"></a><span class="lineno"> 832</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> weightDimSizes[4] = {</div><div class="line"><a name="l00833"></a><span class="lineno"> 833</span>  <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(1)), <span class="comment">// output channels</span></div><div class="line"><a name="l00834"></a><span class="lineno"> 834</span>  static_cast<unsigned int>(inputShape.dim(1)), <span class="comment">// input channels</span></div><div class="line"><a name="l00835"></a><span class="lineno"> 835</span>  kernelH,</div><div class="line"><a name="l00836"></a><span class="lineno"> 836</span>  kernelW};</div><div class="line"><a name="l00837"></a><span class="lineno"> 837</span> </div><div class="line"><a name="l00838"></a><span class="lineno"> 838</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* returnLayer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00839"></a><span class="lineno"> 839</span> </div><div class="line"><a name="l00840"></a><span class="lineno"> 840</span>  <span class="comment">// Pull out the weights for this group from that loaded from the model file earlier</span></div><div class="line"><a name="l00841"></a><span class="lineno"> 841</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> weights(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(4, weightDimSizes, DataType::Float32), weightData.data());</div><div class="line"><a name="l00842"></a><span class="lineno"> 842</span>  <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a> optionalBiases;</div><div class="line"><a name="l00843"></a><span class="lineno"> 843</span>  vector<float> biasData;</div><div class="line"><a name="l00844"></a><span class="lineno"> 844</span>  <span class="keywordflow">if</span> (convolution2dDescriptor.<a class="code" href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a>)</div><div class="line"><a name="l00845"></a><span class="lineno"> 845</span>  {</div><div class="line"><a name="l00846"></a><span class="lineno"> 846</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> biasInfo;</div><div class="line"><a name="l00847"></a><span class="lineno"> 847</span> </div><div class="line"><a name="l00848"></a><span class="lineno"> 848</span>  biasData.resize(boost::numeric_cast<size_t>(outputShape.dim(1)), 1.f);</div><div class="line"><a name="l00849"></a><span class="lineno"> 849</span>  GetDataFromBlob(layerParam, biasData, 1);</div><div class="line"><a name="l00850"></a><span class="lineno"> 850</span> </div><div class="line"><a name="l00851"></a><span class="lineno"> 851</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> biasDimSizes[1] = {<span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(outputShape.dim(1))};</div><div class="line"><a name="l00852"></a><span class="lineno"> 852</span>  biasInfo = <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, biasDimSizes, DataType::Float32);</div><div class="line"><a name="l00853"></a><span class="lineno"> 853</span> </div><div class="line"><a name="l00854"></a><span class="lineno"> 854</span>  <span class="comment">// Pull out the biases for this group from that loaded from the model file earlier</span></div><div class="line"><a name="l00855"></a><span class="lineno"> 855</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> biases(biasInfo, biasData.data());</div><div class="line"><a name="l00856"></a><span class="lineno"> 856</span>  optionalBiases = <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a>(biases);</div><div class="line"><a name="l00857"></a><span class="lineno"> 857</span>  }</div><div class="line"><a name="l00858"></a><span class="lineno"> 858</span>  returnLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddConvolution2dLayer(convolution2dDescriptor,</div><div class="line"><a name="l00859"></a><span class="lineno"> 859</span>  weights,</div><div class="line"><a name="l00860"></a><span class="lineno"> 860</span>  optionalBiases,</div><div class="line"><a name="l00861"></a><span class="lineno"> 861</span>  layerParam.name().c_str());</div><div class="line"><a name="l00862"></a><span class="lineno"> 862</span> </div><div class="line"><a name="l00863"></a><span class="lineno"> 863</span>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& inputConnection = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0));</div><div class="line"><a name="l00864"></a><span class="lineno"> 864</span>  inputConnection.<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">Connect</a>(returnLayer->GetInputSlot(0));</div><div class="line"><a name="l00865"></a><span class="lineno"> 865</span>  returnLayer->GetOutputSlot(0).SetTensorInfo(<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a>(outputShape));</div><div class="line"><a name="l00866"></a><span class="lineno"> 866</span> </div><div class="line"><a name="l00867"></a><span class="lineno"> 867</span>  <span class="keywordflow">if</span> (!returnLayer)</div><div class="line"><a name="l00868"></a><span class="lineno"> 868</span>  {</div><div class="line"><a name="l00869"></a><span class="lineno"> 869</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00870"></a><span class="lineno"> 870</span>  boost::str(</div><div class="line"><a name="l00871"></a><span class="lineno"> 871</span>  boost::format(</div><div class="line"><a name="l00872"></a><span class="lineno"> 872</span>  <span class="stringliteral">"Failed to create Convolution layer. "</span></div><div class="line"><a name="l00873"></a><span class="lineno"> 873</span>  <span class="stringliteral">"Layer=%1% #groups=%2% #filters=%3% %4%"</span>) %</div><div class="line"><a name="l00874"></a><span class="lineno"> 874</span>  layerParam.name() %</div><div class="line"><a name="l00875"></a><span class="lineno"> 875</span>  numGroups %</div><div class="line"><a name="l00876"></a><span class="lineno"> 876</span>  numFilters %</div><div class="line"><a name="l00877"></a><span class="lineno"> 877</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00878"></a><span class="lineno"> 878</span>  }</div><div class="line"><a name="l00879"></a><span class="lineno"> 879</span> </div><div class="line"><a name="l00880"></a><span class="lineno"> 880</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), returnLayer->GetOutputSlot(0));</div><div class="line"><a name="l00881"></a><span class="lineno"> 881</span> }</div><div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_aa9e49717ebdb741e8c767741647fc618"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">armnn::Convolution2dDescriptor::m_PadBottom</a></div><div class="ttdeci">uint32_t m_PadBottom</div><div class="ttdoc">Padding bottom value in the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00428">Descriptors.hpp:428</a></div></div> |
| 1063 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_aea202e14d8874cefd9a0f778022b7e25"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">armnn::Convolution2dDescriptor::m_BiasEnabled</a></div><div class="ttdeci">bool m_BiasEnabled</div><div class="ttdoc">Enable/disable bias. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00438">Descriptors.hpp:438</a></div></div> |
| 1064 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1065 | <div class="ttc" id="classarmnn_1_1_optional_xhtml"><div class="ttname"><a href="classarmnn_1_1_optional.xhtml">armnn::Optional</a></div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00270">Optional.hpp:270</a></div></div> |
| 1066 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1067 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1068 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml">armnn::Convolution2dDescriptor</a></div><div class="ttdoc">A Convolution2dDescriptor for the Convolution2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00392">Descriptors.hpp:392</a></div></div> |
| 1069 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_a002bc30e590d78cbb4f4d12171055ca7"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">armnn::Convolution2dDescriptor::m_PadRight</a></div><div class="ttdeci">uint32_t m_PadRight</div><div class="ttdoc">Padding right value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00424">Descriptors.hpp:424</a></div></div> |
| 1070 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_a56b51f56cef50cdfa554258eecdab046"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#a56b51f56cef50cdfa554258eecdab046">armnn::Convolution2dDescriptor::m_PadTop</a></div><div class="ttdeci">uint32_t m_PadTop</div><div class="ttdoc">Padding top value in the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00426">Descriptors.hpp:426</a></div></div> |
| 1071 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_afe6a3377c4531315354def9023c8fdda"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">armnn::Convolution2dDescriptor::m_StrideX</a></div><div class="ttdeci">uint32_t m_StrideX</div><div class="ttdoc">Stride value when proceeding through input for the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00430">Descriptors.hpp:430</a></div></div> |
| 1072 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 1073 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 1074 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a77e6c08b48c99fafa560805270503856"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">armnnCaffeParser::CaffeParserBase::BlobShapeToTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo BlobShapeToTensorInfo(const caffe::BlobShape &blobShape) const</div><div class="ttdoc">Converts Caffe&#39;s protobuf tensor shape format to ArmNN&#39;s. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParser.cpp:314</a></div></div> |
| 1075 | <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> |
| 1076 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_ac1fe174bbadfb39a2b636940c2e647c8"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">armnn::Convolution2dDescriptor::m_StrideY</a></div><div class="ttdeci">uint32_t m_StrideY</div><div class="ttdoc">Stride value when proceeding through input for the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00432">Descriptors.hpp:432</a></div></div> |
| 1077 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9fea304829fe514d664de515ca5c3918"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9fea304829fe514d664de515ca5c3918">armnnCaffeParser::CaffeParserBase::AddConvLayerWithSplits</a></div><div class="ttdeci">void AddConvLayerWithSplits(const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH)</div><div class="ttdoc">ParseConv may use these helpers depending on the group parameter. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParser.cpp:419</a></div></div> |
| 1078 | <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> |
| 1079 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1080 | <div class="ttc" id="_caffe_parser_8cpp_xhtml_a7553d91772274ed9b103824bbf7f75a5"><div class="ttname"><a href="_caffe_parser_8cpp.xhtml#a7553d91772274ed9b103824bbf7f75a5">GET_OPTIONAL_WITH_VECTOR_FALLBACK</a></div><div class="ttdeci">#define GET_OPTIONAL_WITH_VECTOR_FALLBACK(PARAM, PARAM_TYPE, OPTIONAL_VALUE, FALLBACK_VECTOR, VALUE_TYPE, DEFAULT_VALUE)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00176">CaffeParser.cpp:176</a></div></div> |
| 1081 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_ac1835f8756a9f03c02fcf9664e3a0fce"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#ac1835f8756a9f03c02fcf9664e3a0fce">armnn::IOutputSlot::Connect</a></div><div class="ttdeci">virtual int Connect(IInputSlot &destination)=0</div></div> |
| 1082 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1083 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_adcb87456482d5df17ef09eca1a808091"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#adcb87456482d5df17ef09eca1a808091">armnnCaffeParser::CaffeParserBase::AddConvLayerWithDepthwiseConv</a></div><div class="ttdeci">void AddConvLayerWithDepthwiseConv(const caffe::LayerParameter &layerParam, const armnn::Convolution2dDescriptor &desc, unsigned int kernelW, unsigned int kernelH)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParser.cpp:611</a></div></div> |
| 1084 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1085 | <div class="ttc" id="structarmnn_1_1_convolution2d_descriptor_xhtml_ac18546ebbebbb32fe0a03baa9bf2c600"><div class="ttname"><a href="structarmnn_1_1_convolution2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">armnn::Convolution2dDescriptor::m_PadLeft</a></div><div class="ttdeci">uint32_t m_PadLeft</div><div class="ttdoc">Padding left value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00422">Descriptors.hpp:422</a></div></div> |
| 1086 | <div class="ttc" id="namespacearmnn_caffe_parser_xhtml_af3fde7630e7c9df35cae9ed2b435dbed"><div class="ttname"><a href="namespacearmnn_caffe_parser.xhtml#af3fde7630e7c9df35cae9ed2b435dbed">armnnCaffeParser::TensorDescToBlobShape</a></div><div class="ttdeci">BlobShape TensorDescToBlobShape(const TensorInfo &desc)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00325">CaffeParser.cpp:325</a></div></div> |
| 1087 | </div><!-- fragment --> |
| 1088 | </div> |
| 1089 | </div> |
| 1090 | <a id="aa4c22681675806fa2c5fbf403d49c628"></a> |
| 1091 | <h2 class="memtitle"><span class="permalink"><a href="#aa4c22681675806fa2c5fbf403d49c628">◆ </a></span>ParseDropoutLayer()</h2> |
| 1092 | |
| 1093 | <div class="memitem"> |
| 1094 | <div class="memproto"> |
| 1095 | <table class="mlabels"> |
| 1096 | <tr> |
| 1097 | <td class="mlabels-left"> |
| 1098 | <table class="memname"> |
| 1099 | <tr> |
| 1100 | <td class="memname">void ParseDropoutLayer </td> |
| 1101 | <td>(</td> |
| 1102 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1103 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1104 | <td></td> |
| 1105 | </tr> |
| 1106 | </table> |
| 1107 | </td> |
| 1108 | <td class="mlabels-right"> |
| 1109 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1110 | </tr> |
| 1111 | </table> |
| 1112 | </div><div class="memdoc"> |
| 1113 | |
| 1114 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01477">1477</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1115 | |
| 1116 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>.</p> |
| 1117 | <div class="fragment"><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>  <span class="comment">// Ignored for inference, so patch the single input to its single output.</span></div><div class="line"><a name="l01480"></a><span class="lineno"> 1480</span>  <span class="keywordflow">if</span> (layerParam.bottom_size() != 1 || layerParam.top_size() != 1)</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>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01483"></a><span class="lineno"> 1483</span>  boost::str(</div><div class="line"><a name="l01484"></a><span class="lineno"> 1484</span>  boost::format(</div><div class="line"><a name="l01485"></a><span class="lineno"> 1485</span>  <span class="stringliteral">"Dropout layer '%1%' should have exactly 1 bottom and 1 top. "</span></div><div class="line"><a name="l01486"></a><span class="lineno"> 1486</span>  <span class="stringliteral">"#bottoms=%2% #tops=%3% %4%"</span>) %</div><div class="line"><a name="l01487"></a><span class="lineno"> 1487</span>  layerParam.name() %</div><div class="line"><a name="l01488"></a><span class="lineno"> 1488</span>  layerParam.bottom_size() %</div><div class="line"><a name="l01489"></a><span class="lineno"> 1489</span>  layerParam.top_size() %</div><div class="line"><a name="l01490"></a><span class="lineno"> 1490</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01491"></a><span class="lineno"> 1491</span>  }</div><div class="line"><a name="l01492"></a><span class="lineno"> 1492</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)));</div><div class="line"><a name="l01493"></a><span class="lineno"> 1493</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1118 | <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> |
| 1119 | <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> |
| 1120 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1121 | </div><!-- fragment --> |
| 1122 | </div> |
| 1123 | </div> |
| 1124 | <a id="a99a846a21b3a6ec97cc1d4344b91df36"></a> |
| 1125 | <h2 class="memtitle"><span class="permalink"><a href="#a99a846a21b3a6ec97cc1d4344b91df36">◆ </a></span>ParseEltwiseLayer()</h2> |
| 1126 | |
| 1127 | <div class="memitem"> |
| 1128 | <div class="memproto"> |
| 1129 | <table class="mlabels"> |
| 1130 | <tr> |
| 1131 | <td class="mlabels-left"> |
| 1132 | <table class="memname"> |
| 1133 | <tr> |
| 1134 | <td class="memname">void ParseEltwiseLayer </td> |
| 1135 | <td>(</td> |
| 1136 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1137 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1138 | <td></td> |
| 1139 | </tr> |
| 1140 | </table> |
| 1141 | </td> |
| 1142 | <td class="mlabels-right"> |
| 1143 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1144 | </tr> |
| 1145 | </table> |
| 1146 | </div><div class="memdoc"> |
| 1147 | |
| 1148 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01230">1230</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1149 | |
| 1150 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1151 | <div class="fragment"><div class="line"><a name="l01231"></a><span class="lineno"> 1231</span> {</div><div class="line"><a name="l01232"></a><span class="lineno"> 1232</span>  ValidateNumInputsOutputs(layerParam, 2, 1);</div><div class="line"><a name="l01233"></a><span class="lineno"> 1233</span> </div><div class="line"><a name="l01234"></a><span class="lineno"> 1234</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01235"></a><span class="lineno"> 1235</span> </div><div class="line"><a name="l01236"></a><span class="lineno"> 1236</span>  <span class="comment">// Ignored Caffe Parameters:</span></div><div class="line"><a name="l01237"></a><span class="lineno"> 1237</span>  <span class="comment">// coeff</span></div><div class="line"><a name="l01238"></a><span class="lineno"> 1238</span> </div><div class="line"><a name="l01239"></a><span class="lineno"> 1239</span>  EltwiseParameter_EltwiseOp operation = EltwiseParameter_EltwiseOp_SUM; <span class="comment">// Defaults to sum as per caffe.</span></div><div class="line"><a name="l01240"></a><span class="lineno"> 1240</span> </div><div class="line"><a name="l01241"></a><span class="lineno"> 1241</span>  <span class="keywordflow">if</span> (layerParam.has_eltwise_param() && layerParam.eltwise_param().has_operation())</div><div class="line"><a name="l01242"></a><span class="lineno"> 1242</span>  {</div><div class="line"><a name="l01243"></a><span class="lineno"> 1243</span>  operation = layerParam.eltwise_param().operation();</div><div class="line"><a name="l01244"></a><span class="lineno"> 1244</span>  }</div><div class="line"><a name="l01245"></a><span class="lineno"> 1245</span> </div><div class="line"><a name="l01246"></a><span class="lineno"> 1246</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* newLayer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l01247"></a><span class="lineno"> 1247</span>  <span class="keywordflow">switch</span> (operation)</div><div class="line"><a name="l01248"></a><span class="lineno"> 1248</span>  {</div><div class="line"><a name="l01249"></a><span class="lineno"> 1249</span>  <span class="keywordflow">case</span> EltwiseParameter_EltwiseOp_SUM:</div><div class="line"><a name="l01250"></a><span class="lineno"> 1250</span>  {</div><div class="line"><a name="l01251"></a><span class="lineno"> 1251</span>  newLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddAdditionLayer(layerParam.name().c_str());</div><div class="line"><a name="l01252"></a><span class="lineno"> 1252</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l01253"></a><span class="lineno"> 1253</span>  }</div><div class="line"><a name="l01254"></a><span class="lineno"> 1254</span>  <span class="keywordflow">case</span> EltwiseParameter_EltwiseOp_PROD:</div><div class="line"><a name="l01255"></a><span class="lineno"> 1255</span>  {</div><div class="line"><a name="l01256"></a><span class="lineno"> 1256</span>  newLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddMultiplicationLayer(layerParam.name().c_str());</div><div class="line"><a name="l01257"></a><span class="lineno"> 1257</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l01258"></a><span class="lineno"> 1258</span>  }</div><div class="line"><a name="l01259"></a><span class="lineno"> 1259</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l01260"></a><span class="lineno"> 1260</span>  {</div><div class="line"><a name="l01261"></a><span class="lineno"> 1261</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01262"></a><span class="lineno"> 1262</span>  boost::str(</div><div class="line"><a name="l01263"></a><span class="lineno"> 1263</span>  boost::format(</div><div class="line"><a name="l01264"></a><span class="lineno"> 1264</span>  <span class="stringliteral">"Unsupported operation %1% in Eltwise layer %2% %3%"</span>) %</div><div class="line"><a name="l01265"></a><span class="lineno"> 1265</span>  operation %</div><div class="line"><a name="l01266"></a><span class="lineno"> 1266</span>  layerParam.name() %</div><div class="line"><a name="l01267"></a><span class="lineno"> 1267</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01268"></a><span class="lineno"> 1268</span>  }</div><div class="line"><a name="l01269"></a><span class="lineno"> 1269</span>  }</div><div class="line"><a name="l01270"></a><span class="lineno"> 1270</span> </div><div class="line"><a name="l01271"></a><span class="lineno"> 1271</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(newLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01272"></a><span class="lineno"> 1272</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(1)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(newLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(1));</div><div class="line"><a name="l01273"></a><span class="lineno"> 1273</span>  newLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01274"></a><span class="lineno"> 1274</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), newLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01275"></a><span class="lineno"> 1275</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1152 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1153 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1154 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1155 | <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> |
| 1156 | <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> |
| 1157 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1158 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1159 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1160 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1161 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1162 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1163 | </div><!-- fragment --> |
| 1164 | </div> |
| 1165 | </div> |
| 1166 | <a id="a34f6df4b84de1e269bcf02efeecc3892"></a> |
| 1167 | <h2 class="memtitle"><span class="permalink"><a href="#a34f6df4b84de1e269bcf02efeecc3892">◆ </a></span>ParseInnerProductLayer()</h2> |
| 1168 | |
| 1169 | <div class="memitem"> |
| 1170 | <div class="memproto"> |
| 1171 | <table class="mlabels"> |
| 1172 | <tr> |
| 1173 | <td class="mlabels-left"> |
| 1174 | <table class="memname"> |
| 1175 | <tr> |
| 1176 | <td class="memname">void ParseInnerProductLayer </td> |
| 1177 | <td>(</td> |
| 1178 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1179 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1180 | <td></td> |
| 1181 | </tr> |
| 1182 | </table> |
| 1183 | </td> |
| 1184 | <td class="mlabels-right"> |
| 1185 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1186 | </tr> |
| 1187 | </table> |
| 1188 | </div><div class="memdoc"> |
| 1189 | |
| 1190 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01134">1134</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1191 | |
| 1192 | <p class="reference">References <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00092">TensorInfo::GetNumDimensions()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00386">FullyConnectedDescriptor::m_BiasEnabled</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00388">FullyConnectedDescriptor::m_TransposeWeightMatrix</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1193 | <div class="fragment"><div class="line"><a name="l01135"></a><span class="lineno"> 1135</span> {</div><div class="line"><a name="l01136"></a><span class="lineno"> 1136</span>  InnerProductParameter param = layerParam.inner_product_param();</div><div class="line"><a name="l01137"></a><span class="lineno"> 1137</span> </div><div class="line"><a name="l01138"></a><span class="lineno"> 1138</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01139"></a><span class="lineno"> 1139</span> </div><div class="line"><a name="l01140"></a><span class="lineno"> 1140</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> outputSize = param.num_output();</div><div class="line"><a name="l01141"></a><span class="lineno"> 1141</span> </div><div class="line"><a name="l01142"></a><span class="lineno"> 1142</span>  <span class="comment">// Ignored Caffe Parameters:</span></div><div class="line"><a name="l01143"></a><span class="lineno"> 1143</span>  <span class="comment">// Weight Filler</span></div><div class="line"><a name="l01144"></a><span class="lineno"> 1144</span>  <span class="comment">// Bias Filler</span></div><div class="line"><a name="l01145"></a><span class="lineno"> 1145</span>  <span class="comment">// Engine</span></div><div class="line"><a name="l01146"></a><span class="lineno"> 1146</span>  <span class="comment">// Axis</span></div><div class="line"><a name="l01147"></a><span class="lineno"> 1147</span> </div><div class="line"><a name="l01148"></a><span class="lineno"> 1148</span>  <a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml">FullyConnectedDescriptor</a> tensorFullyConnectedDescriptor;</div><div class="line"><a name="l01149"></a><span class="lineno"> 1149</span> </div><div class="line"><a name="l01150"></a><span class="lineno"> 1150</span>  <span class="keywordflow">if</span> (param.has_transpose())</div><div class="line"><a name="l01151"></a><span class="lineno"> 1151</span>  {</div><div class="line"><a name="l01152"></a><span class="lineno"> 1152</span>  <span class="comment">// If true, assumes transposed weights.</span></div><div class="line"><a name="l01153"></a><span class="lineno"> 1153</span>  tensorFullyConnectedDescriptor.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#a281fcaec86e17c97f7b8402633f6b55a">m_TransposeWeightMatrix</a> = param.transpose();</div><div class="line"><a name="l01154"></a><span class="lineno"> 1154</span>  }</div><div class="line"><a name="l01155"></a><span class="lineno"> 1155</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01156"></a><span class="lineno"> 1156</span>  {</div><div class="line"><a name="l01157"></a><span class="lineno"> 1157</span>  <span class="comment">// Caffe defaults to transposed.</span></div><div class="line"><a name="l01158"></a><span class="lineno"> 1158</span>  tensorFullyConnectedDescriptor.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#a281fcaec86e17c97f7b8402633f6b55a">m_TransposeWeightMatrix</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l01159"></a><span class="lineno"> 1159</span>  }</div><div class="line"><a name="l01160"></a><span class="lineno"> 1160</span> </div><div class="line"><a name="l01161"></a><span class="lineno"> 1161</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01162"></a><span class="lineno"> 1162</span> </div><div class="line"><a name="l01163"></a><span class="lineno"> 1163</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> weightInfo;</div><div class="line"><a name="l01164"></a><span class="lineno"> 1164</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> biasInfo;</div><div class="line"><a name="l01165"></a><span class="lineno"> 1165</span> </div><div class="line"><a name="l01166"></a><span class="lineno"> 1166</span>  <span class="comment">// Allows implicit flattening of extra dimensions.</span></div><div class="line"><a name="l01167"></a><span class="lineno"> 1167</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> inputSize = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l01168"></a><span class="lineno"> 1168</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> i = 2; i < inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">GetNumDimensions</a>(); ++i)</div><div class="line"><a name="l01169"></a><span class="lineno"> 1169</span>  {</div><div class="line"><a name="l01170"></a><span class="lineno"> 1170</span>  inputSize *= inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[i];</div><div class="line"><a name="l01171"></a><span class="lineno"> 1171</span>  }</div><div class="line"><a name="l01172"></a><span class="lineno"> 1172</span> </div><div class="line"><a name="l01173"></a><span class="lineno"> 1173</span>  <span class="keyword">const</span> <span class="keywordtype">float</span>* weightDataPtr = GetArrayPtrFromBlob(layerParam, 0);</div><div class="line"><a name="l01174"></a><span class="lineno"> 1174</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> swTD[2] = { outputSize, inputSize };</div><div class="line"><a name="l01175"></a><span class="lineno"> 1175</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> weights(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(2, swTD, DataType::Float32), weightDataPtr);</div><div class="line"><a name="l01176"></a><span class="lineno"> 1176</span> </div><div class="line"><a name="l01177"></a><span class="lineno"> 1177</span>  tensorFullyConnectedDescriptor.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a> = <span class="keyword">true</span>;</div><div class="line"><a name="l01178"></a><span class="lineno"> 1178</span>  <span class="comment">// Todo: check whether bias enabled.</span></div><div class="line"><a name="l01179"></a><span class="lineno"> 1179</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* fullyConnectedLayer = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l01180"></a><span class="lineno"> 1180</span>  <span class="keywordflow">if</span> (tensorFullyConnectedDescriptor.<a class="code" href="structarmnn_1_1_fully_connected_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">m_BiasEnabled</a>)</div><div class="line"><a name="l01181"></a><span class="lineno"> 1181</span>  {</div><div class="line"><a name="l01182"></a><span class="lineno"> 1182</span>  <span class="comment">// BIAS VALUE</span></div><div class="line"><a name="l01183"></a><span class="lineno"> 1183</span>  <span class="keyword">const</span> <span class="keywordtype">float</span>* biasDataPtr = GetArrayPtrFromBlob(layerParam, 1);</div><div class="line"><a name="l01184"></a><span class="lineno"> 1184</span> </div><div class="line"><a name="l01185"></a><span class="lineno"> 1185</span>  <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sbTD[1] = { outputSize };</div><div class="line"><a name="l01186"></a><span class="lineno"> 1186</span> </div><div class="line"><a name="l01187"></a><span class="lineno"> 1187</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> biases(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, sbTD, DataType::Float32), biasDataPtr);</div><div class="line"><a name="l01188"></a><span class="lineno"> 1188</span> </div><div class="line"><a name="l01189"></a><span class="lineno"> 1189</span>  fullyConnectedLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddFullyConnectedLayer(tensorFullyConnectedDescriptor,</div><div class="line"><a name="l01190"></a><span class="lineno"> 1190</span>  weights,</div><div class="line"><a name="l01191"></a><span class="lineno"> 1191</span>  <a class="code" href="classarmnn_1_1_optional.xhtml">Optional<ConstTensor></a>(biases),</div><div class="line"><a name="l01192"></a><span class="lineno"> 1192</span>  layerParam.name().c_str());</div><div class="line"><a name="l01193"></a><span class="lineno"> 1193</span>  }</div><div class="line"><a name="l01194"></a><span class="lineno"> 1194</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01195"></a><span class="lineno"> 1195</span>  {</div><div class="line"><a name="l01196"></a><span class="lineno"> 1196</span>  fullyConnectedLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddFullyConnectedLayer(tensorFullyConnectedDescriptor,</div><div class="line"><a name="l01197"></a><span class="lineno"> 1197</span>  weights,</div><div class="line"><a name="l01198"></a><span class="lineno"> 1198</span>  <a class="code" href="structarmnn_1_1_empty_optional.xhtml">EmptyOptional</a>(),</div><div class="line"><a name="l01199"></a><span class="lineno"> 1199</span>  layerParam.name().c_str());</div><div class="line"><a name="l01200"></a><span class="lineno"> 1200</span>  }</div><div class="line"><a name="l01201"></a><span class="lineno"> 1201</span> </div><div class="line"><a name="l01202"></a><span class="lineno"> 1202</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> outputInfo({ inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[0], outputSize }, DataType::Float32);</div><div class="line"><a name="l01203"></a><span class="lineno"> 1203</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01204"></a><span class="lineno"> 1204</span>  fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(outputInfo);</div><div class="line"><a name="l01205"></a><span class="lineno"> 1205</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), fullyConnectedLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01206"></a><span class="lineno"> 1206</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1194 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 1195 | <div class="ttc" id="classarmnn_1_1_optional_xhtml"><div class="ttname"><a href="classarmnn_1_1_optional.xhtml">armnn::Optional</a></div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00270">Optional.hpp:270</a></div></div> |
| 1196 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1197 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1198 | <div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml_a281fcaec86e17c97f7b8402633f6b55a"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml#a281fcaec86e17c97f7b8402633f6b55a">armnn::FullyConnectedDescriptor::m_TransposeWeightMatrix</a></div><div class="ttdeci">bool m_TransposeWeightMatrix</div><div class="ttdoc">Enable/disable transpose weight matrix. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00388">Descriptors.hpp:388</a></div></div> |
| 1199 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1200 | <div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml">armnn::FullyConnectedDescriptor</a></div><div class="ttdoc">A FullyConnectedDescriptor for the FullyConnectedLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00373">Descriptors.hpp:373</a></div></div> |
| 1201 | <div class="ttc" id="structarmnn_1_1_fully_connected_descriptor_xhtml_aea202e14d8874cefd9a0f778022b7e25"><div class="ttname"><a href="structarmnn_1_1_fully_connected_descriptor.xhtml#aea202e14d8874cefd9a0f778022b7e25">armnn::FullyConnectedDescriptor::m_BiasEnabled</a></div><div class="ttdeci">bool m_BiasEnabled</div><div class="ttdoc">Enable/disable bias. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00386">Descriptors.hpp:386</a></div></div> |
| 1202 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 1203 | <div class="ttc" id="structarmnn_1_1_empty_optional_xhtml"><div class="ttname"><a href="structarmnn_1_1_empty_optional.xhtml">armnn::EmptyOptional</a></div><div class="ttdoc">EmptyOptional is used to initialize the Optional class in case we want to have default value for an O...</div><div class="ttdef"><b>Definition:</b> <a href="_optional_8hpp_source.xhtml#l00032">Optional.hpp:32</a></div></div> |
| 1204 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1205 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1206 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1207 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1208 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1209 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a157e27d41e9f6b21f0d3c025fa47dc24"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a157e27d41e9f6b21f0d3c025fa47dc24">armnn::TensorInfo::GetNumDimensions</a></div><div class="ttdeci">unsigned int GetNumDimensions() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00092">Tensor.hpp:92</a></div></div> |
| 1210 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1211 | </div><!-- fragment --> |
| 1212 | </div> |
| 1213 | </div> |
| 1214 | <a id="a3a2636dd8414f2bb62c5fa097bdc9791"></a> |
| 1215 | <h2 class="memtitle"><span class="permalink"><a href="#a3a2636dd8414f2bb62c5fa097bdc9791">◆ </a></span>ParseInputLayer()</h2> |
| 1216 | |
| 1217 | <div class="memitem"> |
| 1218 | <div class="memproto"> |
| 1219 | <table class="mlabels"> |
| 1220 | <tr> |
| 1221 | <td class="mlabels-left"> |
| 1222 | <table class="memname"> |
| 1223 | <tr> |
| 1224 | <td class="memname">void ParseInputLayer </td> |
| 1225 | <td>(</td> |
| 1226 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1227 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1228 | <td></td> |
| 1229 | </tr> |
| 1230 | </table> |
| 1231 | </td> |
| 1232 | <td class="mlabels-right"> |
| 1233 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1234 | </tr> |
| 1235 | </table> |
| 1236 | </div><div class="memdoc"> |
| 1237 | |
| 1238 | <p>Adds an armnn layer to m_Network given a Caffe LayerParameter of the correct type and is responsible for recording any newly created IOutputSlots using <a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop()</a>. </p> |
| 1239 | |
| 1240 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">364</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1241 | |
| 1242 | <p class="reference">References <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParserBase::BlobShapeToTensorInfo()</a>, <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParserBase::m_InputShapes</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParserBase::m_NetworkInputsBindingInfo</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00090">TensorInfo::SetShape()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01495">CaffeParserBase::TrackInputBinding()</a>.</p> |
| 1243 | <div class="fragment"><div class="line"><a name="l00365"></a><span class="lineno"> 365</span> {</div><div class="line"><a name="l00366"></a><span class="lineno"> 366</span>  BOOST_ASSERT(layerParam.type() == <span class="stringliteral">"Input"</span>);</div><div class="line"><a name="l00367"></a><span class="lineno"> 367</span>  ValidateNumInputsOutputs(layerParam, 0, 1);</div><div class="line"><a name="l00368"></a><span class="lineno"> 368</span> </div><div class="line"><a name="l00369"></a><span class="lineno"> 369</span>  <span class="keyword">const</span> InputParameter& param = layerParam.input_param();</div><div class="line"><a name="l00370"></a><span class="lineno"> 370</span> </div><div class="line"><a name="l00371"></a><span class="lineno"> 371</span>  <span class="keyword">const</span> <a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> inputId = <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<a class="code" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a>>(</div><div class="line"><a name="l00372"></a><span class="lineno"> 372</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">m_NetworkInputsBindingInfo</a>.size());</div><div class="line"><a name="l00373"></a><span class="lineno"> 373</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* <span class="keyword">const</span> inputLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddInputLayer(inputId, layerParam.name().c_str());</div><div class="line"><a name="l00374"></a><span class="lineno"> 374</span> </div><div class="line"><a name="l00375"></a><span class="lineno"> 375</span>  <span class="comment">// Decides the tensor info for this input. This can be specified in the Caffe network but can also</span></div><div class="line"><a name="l00376"></a><span class="lineno"> 376</span>  <span class="comment">// be overriden by user input (m_inputShapes).</span></div><div class="line"><a name="l00377"></a><span class="lineno"> 377</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> inputTensorInfo;</div><div class="line"><a name="l00378"></a><span class="lineno"> 378</span> </div><div class="line"><a name="l00379"></a><span class="lineno"> 379</span>  <span class="keyword">const</span> BlobShape* originalShape = param.shape_size() > 0 && param.shape(0).dim_size() > 0 ?</div><div class="line"><a name="l00380"></a><span class="lineno"> 380</span>  &param.shape(0) : <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00381"></a><span class="lineno"> 381</span>  <span class="keywordflow">if</span> (originalShape)</div><div class="line"><a name="l00382"></a><span class="lineno"> 382</span>  {</div><div class="line"><a name="l00383"></a><span class="lineno"> 383</span>  inputTensorInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">BlobShapeToTensorInfo</a>(*originalShape);</div><div class="line"><a name="l00384"></a><span class="lineno"> 384</span>  }</div><div class="line"><a name="l00385"></a><span class="lineno"> 385</span> </div><div class="line"><a name="l00386"></a><span class="lineno"> 386</span>  <span class="keyword">auto</span> overrideIt = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">m_InputShapes</a>.find(layerParam.name());</div><div class="line"><a name="l00387"></a><span class="lineno"> 387</span>  <span class="keywordflow">if</span> (overrideIt != <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">m_InputShapes</a>.end())</div><div class="line"><a name="l00388"></a><span class="lineno"> 388</span>  {</div><div class="line"><a name="l00389"></a><span class="lineno"> 389</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_shape.xhtml">TensorShape</a>& overrideShape = overrideIt->second;</div><div class="line"><a name="l00390"></a><span class="lineno"> 390</span>  <span class="keywordflow">if</span> (originalShape &&</div><div class="line"><a name="l00391"></a><span class="lineno"> 391</span>  ( originalShape->dim(1) != overrideShape[1]</div><div class="line"><a name="l00392"></a><span class="lineno"> 392</span>  || originalShape->dim(2) != overrideShape[2]</div><div class="line"><a name="l00393"></a><span class="lineno"> 393</span>  || originalShape->dim(3) != overrideShape[3]))</div><div class="line"><a name="l00394"></a><span class="lineno"> 394</span>  {</div><div class="line"><a name="l00395"></a><span class="lineno"> 395</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00396"></a><span class="lineno"> 396</span>  boost::str(</div><div class="line"><a name="l00397"></a><span class="lineno"> 397</span>  boost::format(</div><div class="line"><a name="l00398"></a><span class="lineno"> 398</span>  <span class="stringliteral">"Parsed input shape for '%1%' is incompatible with the override provided. %2%"</span>) %</div><div class="line"><a name="l00399"></a><span class="lineno"> 399</span>  layerParam.name() %</div><div class="line"><a name="l00400"></a><span class="lineno"> 400</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00401"></a><span class="lineno"> 401</span>  }</div><div class="line"><a name="l00402"></a><span class="lineno"> 402</span>  inputTensorInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">SetShape</a>(overrideShape);</div><div class="line"><a name="l00403"></a><span class="lineno"> 403</span>  }</div><div class="line"><a name="l00404"></a><span class="lineno"> 404</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (!originalShape)</div><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>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00407"></a><span class="lineno"> 407</span>  boost::str(</div><div class="line"><a name="l00408"></a><span class="lineno"> 408</span>  boost::format(</div><div class="line"><a name="l00409"></a><span class="lineno"> 409</span>  <span class="stringliteral">"No input descriptor given for '%1%' and no input shape found in caffe model. %2%"</span>) %</div><div class="line"><a name="l00410"></a><span class="lineno"> 410</span>  layerParam.name() %</div><div class="line"><a name="l00411"></a><span class="lineno"> 411</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00412"></a><span class="lineno"> 412</span>  }</div><div class="line"><a name="l00413"></a><span class="lineno"> 413</span> </div><div class="line"><a name="l00414"></a><span class="lineno"> 414</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2a1112c66d08e3760ecccf39c7854a90">TrackInputBinding</a>(inputLayer, inputId, inputTensorInfo);</div><div class="line"><a name="l00415"></a><span class="lineno"> 415</span>  inputLayer->GetOutputSlot(0).SetTensorInfo(inputTensorInfo);</div><div class="line"><a name="l00416"></a><span class="lineno"> 416</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), inputLayer->GetOutputSlot(0));</div><div class="line"><a name="l00417"></a><span class="lineno"> 417</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1244 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1245 | <div class="ttc" id="classarmnn_1_1_tensor_shape_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00020">Tensor.hpp:20</a></div></div> |
| 1246 | <div class="ttc" id="namespacearmnn_xhtml_ab8cf8f9fb6792e654c2d8d8382f6f01b"><div class="ttname"><a href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a></div><div class="ttdeci">int LayerBindingId</div><div class="ttdoc">Type of identifiers for bindable layers (inputs, outputs). </div><div class="ttdef"><b>Definition:</b> <a href="_types_8hpp_source.xhtml#l00171">Types.hpp:171</a></div></div> |
| 1247 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_abe8889e8150beef5fd204b2d87b49298"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#abe8889e8150beef5fd204b2d87b49298">armnn::TensorInfo::SetShape</a></div><div class="ttdeci">void SetShape(const TensorShape &newShape)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00090">Tensor.hpp:90</a></div></div> |
| 1248 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ac62e2558c14e01605f2b4e1e21cdd1e8"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">armnnCaffeParser::CaffeParserBase::m_NetworkInputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkInputsBindingInfo</div><div class="ttdoc">maps input layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParser.hpp:121</a></div></div> |
| 1249 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 1250 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a77e6c08b48c99fafa560805270503856"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a77e6c08b48c99fafa560805270503856">armnnCaffeParser::CaffeParserBase::BlobShapeToTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo BlobShapeToTensorInfo(const caffe::BlobShape &blobShape) const</div><div class="ttdoc">Converts Caffe&#39;s protobuf tensor shape format to ArmNN&#39;s. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00314">CaffeParser.cpp:314</a></div></div> |
| 1251 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a76ea67f3f7d1d5835c5a92b65dc0854c"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a76ea67f3f7d1d5835c5a92b65dc0854c">armnnCaffeParser::CaffeParserBase::m_InputShapes</a></div><div class="ttdeci">std::map< std::string, armnn::TensorShape > m_InputShapes</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00128">CaffeParser.hpp:128</a></div></div> |
| 1252 | <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> |
| 1253 | <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> |
| 1254 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2a1112c66d08e3760ecccf39c7854a90"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2a1112c66d08e3760ecccf39c7854a90">armnnCaffeParser::CaffeParserBase::TrackInputBinding</a></div><div class="ttdeci">void TrackInputBinding(armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01495">CaffeParser.cpp:1495</a></div></div> |
| 1255 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1256 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1257 | </div><!-- fragment --> |
| 1258 | </div> |
| 1259 | </div> |
| 1260 | <a id="a7785119cfebd2b02ba3be888965e52ba"></a> |
| 1261 | <h2 class="memtitle"><span class="permalink"><a href="#a7785119cfebd2b02ba3be888965e52ba">◆ </a></span>ParseLRNLayer()</h2> |
| 1262 | |
| 1263 | <div class="memitem"> |
| 1264 | <div class="memproto"> |
| 1265 | <table class="mlabels"> |
| 1266 | <tr> |
| 1267 | <td class="mlabels-left"> |
| 1268 | <table class="memname"> |
| 1269 | <tr> |
| 1270 | <td class="memname">void ParseLRNLayer </td> |
| 1271 | <td>(</td> |
| 1272 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1273 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1274 | <td></td> |
| 1275 | </tr> |
| 1276 | </table> |
| 1277 | </td> |
| 1278 | <td class="mlabels-right"> |
| 1279 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1280 | </tr> |
| 1281 | </table> |
| 1282 | </div><div class="memdoc"> |
| 1283 | |
| 1284 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01027">1027</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1285 | |
| 1286 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00581">NormalizationDescriptor::m_Alpha</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00583">NormalizationDescriptor::m_Beta</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00585">NormalizationDescriptor::m_K</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00575">NormalizationDescriptor::m_NormChannelType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00577">NormalizationDescriptor::m_NormMethodType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00579">NormalizationDescriptor::m_NormSize</a>, <a class="el" href="_numeric_cast_8hpp_source.xhtml#l00033">armnn::numeric_cast()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1287 | <div class="fragment"><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span> {</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span> </div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>  LRNParameter param = layerParam.lrn_param();</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span> </div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span> </div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>  <span class="comment">// Ignored BATCH NORMALIZATION Caffe Parameters.</span></div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>  <span class="comment">// Ignored MVN Caffe Parameters.</span></div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>  <span class="comment">// Ignored LRN Caffe Parameters.</span></div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>  <span class="comment">// Engine</span></div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span> </div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>  <a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml">NormalizationDescriptor</a> normalizationDescriptor;</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>  <span class="keywordflow">if</span> (param.has_norm_region())</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>  {</div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>  LRNParameter_NormRegion n = param.norm_region();</div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>  <span class="keywordflow">switch</span> (n)</div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>  {</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>  <span class="keywordflow">case</span> LRNParameter_NormRegion_ACROSS_CHANNELS:</div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>  {</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#afe1f0f09d49ad2befc01f8789187b7dd">m_NormChannelType</a> = NormalizationAlgorithmChannel::Across;</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>  }</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>  <span class="keywordflow">case</span> LRNParameter_NormRegion_WITHIN_CHANNEL:</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>  {</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#afe1f0f09d49ad2befc01f8789187b7dd">m_NormChannelType</a> = NormalizationAlgorithmChannel::Within;</div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>  }</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>  {</div><div class="line"><a name="l01058"></a><span class="lineno"> 1058</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>  boost::str(</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>  boost::format(</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>  <span class="stringliteral">"Unknown region %1% for LRN layer %2% %3%"</span>) %</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>  n %</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>  layerParam.name() %</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>  }</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>  }</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>  }</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>  {</div><div class="line"><a name="l01070"></a><span class="lineno"> 1070</span>  <span class="comment">// Caffe defaults to normalization across channels.</span></div><div class="line"><a name="l01071"></a><span class="lineno"> 1071</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#afe1f0f09d49ad2befc01f8789187b7dd">m_NormChannelType</a> = NormalizationAlgorithmChannel::Across;</div><div class="line"><a name="l01072"></a><span class="lineno"> 1072</span>  }</div><div class="line"><a name="l01073"></a><span class="lineno"> 1073</span> </div><div class="line"><a name="l01074"></a><span class="lineno"> 1074</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a05945f080edf694b631960728b87aadb">m_NormMethodType</a> = NormalizationAlgorithmMethod::LocalBrightness;</div><div class="line"><a name="l01075"></a><span class="lineno"> 1075</span>  <span class="keywordflow">if</span> (param.has_local_size())</div><div class="line"><a name="l01076"></a><span class="lineno"> 1076</span>  {</div><div class="line"><a name="l01077"></a><span class="lineno"> 1077</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#aa70c05f1aad12fbd9d9ec43ea4557b03">m_NormSize</a> = param.local_size();</div><div class="line"><a name="l01078"></a><span class="lineno"> 1078</span>  }</div><div class="line"><a name="l01079"></a><span class="lineno"> 1079</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01080"></a><span class="lineno"> 1080</span>  {</div><div class="line"><a name="l01081"></a><span class="lineno"> 1081</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01082"></a><span class="lineno"> 1082</span>  boost::str(</div><div class="line"><a name="l01083"></a><span class="lineno"> 1083</span>  boost::format(</div><div class="line"><a name="l01084"></a><span class="lineno"> 1084</span>  <span class="stringliteral">"local_size not defined for LRN layer %1% %2%"</span>) %</div><div class="line"><a name="l01085"></a><span class="lineno"> 1085</span>  layerParam.name() %</div><div class="line"><a name="l01086"></a><span class="lineno"> 1086</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01087"></a><span class="lineno"> 1087</span>  }</div><div class="line"><a name="l01088"></a><span class="lineno"> 1088</span> </div><div class="line"><a name="l01089"></a><span class="lineno"> 1089</span>  <span class="keywordflow">if</span> (param.has_alpha())</div><div class="line"><a name="l01090"></a><span class="lineno"> 1090</span>  {</div><div class="line"><a name="l01091"></a><span class="lineno"> 1091</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a174279be57d7596eeb04c6b7f7510f99">m_Alpha</a> = param.alpha();</div><div class="line"><a name="l01092"></a><span class="lineno"> 1092</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a174279be57d7596eeb04c6b7f7510f99">m_Alpha</a> /= <a class="code" href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">boost::numeric_cast</a><<span class="keywordtype">float</span>>(param.local_size());</div><div class="line"><a name="l01093"></a><span class="lineno"> 1093</span>  }</div><div class="line"><a name="l01094"></a><span class="lineno"> 1094</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01095"></a><span class="lineno"> 1095</span>  {</div><div class="line"><a name="l01096"></a><span class="lineno"> 1096</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01097"></a><span class="lineno"> 1097</span>  boost::str(</div><div class="line"><a name="l01098"></a><span class="lineno"> 1098</span>  boost::format(</div><div class="line"><a name="l01099"></a><span class="lineno"> 1099</span>  <span class="stringliteral">"Alpha not defined for LRN layer %1% %2%"</span>) %</div><div class="line"><a name="l01100"></a><span class="lineno"> 1100</span>  layerParam.name() %</div><div class="line"><a name="l01101"></a><span class="lineno"> 1101</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01102"></a><span class="lineno"> 1102</span>  }</div><div class="line"><a name="l01103"></a><span class="lineno"> 1103</span>  <span class="keywordflow">if</span> (param.has_beta())</div><div class="line"><a name="l01104"></a><span class="lineno"> 1104</span>  {</div><div class="line"><a name="l01105"></a><span class="lineno"> 1105</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a8275d51ef9a584feb95726ea0522f6e5">m_Beta</a> = param.beta();</div><div class="line"><a name="l01106"></a><span class="lineno"> 1106</span>  }</div><div class="line"><a name="l01107"></a><span class="lineno"> 1107</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01108"></a><span class="lineno"> 1108</span>  {</div><div class="line"><a name="l01109"></a><span class="lineno"> 1109</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01110"></a><span class="lineno"> 1110</span>  boost::str(</div><div class="line"><a name="l01111"></a><span class="lineno"> 1111</span>  boost::format(</div><div class="line"><a name="l01112"></a><span class="lineno"> 1112</span>  <span class="stringliteral">"Beta not defined for LRN layer %1% %2%"</span>) %</div><div class="line"><a name="l01113"></a><span class="lineno"> 1113</span>  layerParam.name() %</div><div class="line"><a name="l01114"></a><span class="lineno"> 1114</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01115"></a><span class="lineno"> 1115</span>  }</div><div class="line"><a name="l01116"></a><span class="lineno"> 1116</span> </div><div class="line"><a name="l01117"></a><span class="lineno"> 1117</span>  <span class="keywordflow">if</span> (param.has_k())</div><div class="line"><a name="l01118"></a><span class="lineno"> 1118</span>  {</div><div class="line"><a name="l01119"></a><span class="lineno"> 1119</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a8526ea7cf860d8e7f8340e9f9354f9f0">m_K</a> = param.k();</div><div class="line"><a name="l01120"></a><span class="lineno"> 1120</span>  }</div><div class="line"><a name="l01121"></a><span class="lineno"> 1121</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01122"></a><span class="lineno"> 1122</span>  {</div><div class="line"><a name="l01123"></a><span class="lineno"> 1123</span>  normalizationDescriptor.<a class="code" href="structarmnn_1_1_normalization_descriptor.xhtml#a8526ea7cf860d8e7f8340e9f9354f9f0">m_K</a> = 1;</div><div class="line"><a name="l01124"></a><span class="lineno"> 1124</span>  }</div><div class="line"><a name="l01125"></a><span class="lineno"> 1125</span> </div><div class="line"><a name="l01126"></a><span class="lineno"> 1126</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* <span class="keyword">const</span> normLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddNormalizationLayer(normalizationDescriptor,</div><div class="line"><a name="l01127"></a><span class="lineno"> 1127</span>  layerParam.name().c_str());</div><div class="line"><a name="l01128"></a><span class="lineno"> 1128</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(normLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01129"></a><span class="lineno"> 1129</span>  normLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01130"></a><span class="lineno"> 1130</span> </div><div class="line"><a name="l01131"></a><span class="lineno"> 1131</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), normLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01132"></a><span class="lineno"> 1132</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1288 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_a8526ea7cf860d8e7f8340e9f9354f9f0"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#a8526ea7cf860d8e7f8340e9f9354f9f0">armnn::NormalizationDescriptor::m_K</a></div><div class="ttdeci">float m_K</div><div class="ttdoc">Kappa value used for the across channel normalization equation. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00585">Descriptors.hpp:585</a></div></div> |
| 1289 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1290 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1291 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_a174279be57d7596eeb04c6b7f7510f99"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#a174279be57d7596eeb04c6b7f7510f99">armnn::NormalizationDescriptor::m_Alpha</a></div><div class="ttdeci">float m_Alpha</div><div class="ttdoc">Alpha value for the normalization equation. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00581">Descriptors.hpp:581</a></div></div> |
| 1292 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1293 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_a05945f080edf694b631960728b87aadb"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#a05945f080edf694b631960728b87aadb">armnn::NormalizationDescriptor::m_NormMethodType</a></div><div class="ttdeci">NormalizationAlgorithmMethod m_NormMethodType</div><div class="ttdoc">Normalization method algorithm to use (LocalBrightness, LocalContrast). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00577">Descriptors.hpp:577</a></div></div> |
| 1294 | <div class="ttc" id="namespacearmnn_xhtml_a37fa39012e90d568df7f774cd6d1e956"><div class="ttname"><a href="namespacearmnn.xhtml#a37fa39012e90d568df7f774cd6d1e956">armnn::numeric_cast</a></div><div class="ttdeci">std::enable_if_t< std::is_unsigned< Source >::value &&std::is_unsigned< Dest >::value, Dest > numeric_cast(Source source)</div><div class="ttdef"><b>Definition:</b> <a href="_numeric_cast_8hpp_source.xhtml#l00033">NumericCast.hpp:33</a></div></div> |
| 1295 | <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> |
| 1296 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_afe1f0f09d49ad2befc01f8789187b7dd"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#afe1f0f09d49ad2befc01f8789187b7dd">armnn::NormalizationDescriptor::m_NormChannelType</a></div><div class="ttdeci">NormalizationAlgorithmChannel m_NormChannelType</div><div class="ttdoc">Normalization channel algorithm to use (Across, Within). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00575">Descriptors.hpp:575</a></div></div> |
| 1297 | <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> |
| 1298 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1299 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1300 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1301 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1302 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1303 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml">armnn::NormalizationDescriptor</a></div><div class="ttdoc">A NormalizationDescriptor for the NormalizationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00551">Descriptors.hpp:551</a></div></div> |
| 1304 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_a8275d51ef9a584feb95726ea0522f6e5"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#a8275d51ef9a584feb95726ea0522f6e5">armnn::NormalizationDescriptor::m_Beta</a></div><div class="ttdeci">float m_Beta</div><div class="ttdoc">Beta value for the normalization equation. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00583">Descriptors.hpp:583</a></div></div> |
| 1305 | <div class="ttc" id="structarmnn_1_1_normalization_descriptor_xhtml_aa70c05f1aad12fbd9d9ec43ea4557b03"><div class="ttname"><a href="structarmnn_1_1_normalization_descriptor.xhtml#aa70c05f1aad12fbd9d9ec43ea4557b03">armnn::NormalizationDescriptor::m_NormSize</a></div><div class="ttdeci">uint32_t m_NormSize</div><div class="ttdoc">Depth radius value. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00579">Descriptors.hpp:579</a></div></div> |
| 1306 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1307 | </div><!-- fragment --> |
| 1308 | </div> |
| 1309 | </div> |
| 1310 | <a id="ab3329e4bcd8e42cd314f84c8260b06ad"></a> |
| 1311 | <h2 class="memtitle"><span class="permalink"><a href="#ab3329e4bcd8e42cd314f84c8260b06ad">◆ </a></span>ParsePoolingLayer()</h2> |
| 1312 | |
| 1313 | <div class="memitem"> |
| 1314 | <div class="memproto"> |
| 1315 | <table class="mlabels"> |
| 1316 | <tr> |
| 1317 | <td class="mlabels-left"> |
| 1318 | <table class="memname"> |
| 1319 | <tr> |
| 1320 | <td class="memname">void ParsePoolingLayer </td> |
| 1321 | <td>(</td> |
| 1322 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1323 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1324 | <td></td> |
| 1325 | </tr> |
| 1326 | </table> |
| 1327 | </td> |
| 1328 | <td class="mlabels-right"> |
| 1329 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1330 | </tr> |
| 1331 | </table> |
| 1332 | </div><div class="memdoc"> |
| 1333 | |
| 1334 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00883">883</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1335 | |
| 1336 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00208">GET_OPTIONAL_WITH_FALLBACK</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00365">Pooling2dDescriptor::m_OutputShapeRounding</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00355">Pooling2dDescriptor::m_PadBottom</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00367">Pooling2dDescriptor::m_PaddingMethod</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00349">Pooling2dDescriptor::m_PadLeft</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00351">Pooling2dDescriptor::m_PadRight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00353">Pooling2dDescriptor::m_PadTop</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00359">Pooling2dDescriptor::m_PoolHeight</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00347">Pooling2dDescriptor::m_PoolType</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00357">Pooling2dDescriptor::m_PoolWidth</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00361">Pooling2dDescriptor::m_StrideX</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00363">Pooling2dDescriptor::m_StrideY</a>, <a class="el" href="namespacearmnn.xhtml#a961bbfe1db71a848eff5a1f0ab775718a6a061313d22e51e0f25b7cd4dc065233">armnn::Max</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1337 | <div class="fragment"><div class="line"><a name="l00884"></a><span class="lineno"> 884</span> {</div><div class="line"><a name="l00885"></a><span class="lineno"> 885</span>  <span class="comment">// Ignored Caffe Parameters</span></div><div class="line"><a name="l00886"></a><span class="lineno"> 886</span>  <span class="comment">// Stochastic Pooling</span></div><div class="line"><a name="l00887"></a><span class="lineno"> 887</span>  <span class="comment">// Engine</span></div><div class="line"><a name="l00888"></a><span class="lineno"> 888</span> </div><div class="line"><a name="l00889"></a><span class="lineno"> 889</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l00890"></a><span class="lineno"> 890</span>  PoolingParameter param = layerParam.pooling_param();</div><div class="line"><a name="l00891"></a><span class="lineno"> 891</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l00892"></a><span class="lineno"> 892</span> </div><div class="line"><a name="l00893"></a><span class="lineno"> 893</span>  <span class="keyword">const</span> <span class="keyword">auto</span> notFound = std::numeric_limits<unsigned int>::max();</div><div class="line"><a name="l00894"></a><span class="lineno"> 894</span> </div><div class="line"><a name="l00895"></a><span class="lineno"> 895</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> kernel_h = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00896"></a><span class="lineno"> 896</span>  kernel_h, kernel_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00897"></a><span class="lineno"> 897</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> kernel_w = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00898"></a><span class="lineno"> 898</span>  kernel_w, kernel_size, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00899"></a><span class="lineno"> 899</span> </div><div class="line"><a name="l00900"></a><span class="lineno"> 900</span>  <span class="keywordflow">if</span> ((kernel_h == notFound || kernel_w == notFound) && param.has_global_pooling())</div><div class="line"><a name="l00901"></a><span class="lineno"> 901</span>  {</div><div class="line"><a name="l00902"></a><span class="lineno"> 902</span>  kernel_h = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[2];</div><div class="line"><a name="l00903"></a><span class="lineno"> 903</span>  kernel_w = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[3];</div><div class="line"><a name="l00904"></a><span class="lineno"> 904</span>  }</div><div class="line"><a name="l00905"></a><span class="lineno"> 905</span> </div><div class="line"><a name="l00906"></a><span class="lineno"> 906</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> stride_h = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00907"></a><span class="lineno"> 907</span>  stride_h, stride, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00908"></a><span class="lineno"> 908</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> stride_w = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00909"></a><span class="lineno"> 909</span>  stride_h, stride, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, notFound);</div><div class="line"><a name="l00910"></a><span class="lineno"> 910</span> </div><div class="line"><a name="l00911"></a><span class="lineno"> 911</span>  <span class="keywordflow">if</span> ((stride_h == notFound || stride_w == notFound) && param.has_global_pooling())</div><div class="line"><a name="l00912"></a><span class="lineno"> 912</span>  {</div><div class="line"><a name="l00913"></a><span class="lineno"> 913</span>  stride_h = 1;</div><div class="line"><a name="l00914"></a><span class="lineno"> 914</span>  stride_w = 1;</div><div class="line"><a name="l00915"></a><span class="lineno"> 915</span>  }</div><div class="line"><a name="l00916"></a><span class="lineno"> 916</span> </div><div class="line"><a name="l00917"></a><span class="lineno"> 917</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pad_h = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00918"></a><span class="lineno"> 918</span>  pad_h, pad, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 0u);</div><div class="line"><a name="l00919"></a><span class="lineno"> 919</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> pad_w = <a class="code" href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a>(param, PoolingParameter,</div><div class="line"><a name="l00920"></a><span class="lineno"> 920</span>  pad_w, pad, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>, 0u);</div><div class="line"><a name="l00921"></a><span class="lineno"> 921</span> </div><div class="line"><a name="l00922"></a><span class="lineno"> 922</span>  <span class="comment">// Populate Weight and Bias Filter Descriptor</span></div><div class="line"><a name="l00923"></a><span class="lineno"> 923</span>  <a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml">Pooling2dDescriptor</a> pooling2dDescriptor;</div><div class="line"><a name="l00924"></a><span class="lineno"> 924</span>  <span class="keywordflow">if</span> (param.has_pool())</div><div class="line"><a name="l00925"></a><span class="lineno"> 925</span>  {</div><div class="line"><a name="l00926"></a><span class="lineno"> 926</span>  PoolingParameter_PoolMethod p = param.pool();</div><div class="line"><a name="l00927"></a><span class="lineno"> 927</span>  <span class="keywordflow">switch</span> (p)</div><div class="line"><a name="l00928"></a><span class="lineno"> 928</span>  {</div><div class="line"><a name="l00929"></a><span class="lineno"> 929</span>  <span class="keywordflow">case</span> PoolingParameter_PoolMethod_MAX:</div><div class="line"><a name="l00930"></a><span class="lineno"> 930</span>  {</div><div class="line"><a name="l00931"></a><span class="lineno"> 931</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a0031997bf43bd2747656c31e4977793a">m_PoolType</a> = <a class="code" href="namespacearmnn.xhtml#a961bbfe1db71a848eff5a1f0ab775718a6a061313d22e51e0f25b7cd4dc065233">PoolingAlgorithm::Max</a>;</div><div class="line"><a name="l00932"></a><span class="lineno"> 932</span>  <span class="keywordflow">break</span>;</div><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">case</span> PoolingParameter_PoolMethod_AVE:</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>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a0031997bf43bd2747656c31e4977793a">m_PoolType</a> = PoolingAlgorithm::Average;</div><div class="line"><a name="l00937"></a><span class="lineno"> 937</span>  <span class="keywordflow">break</span>;</div><div class="line"><a name="l00938"></a><span class="lineno"> 938</span>  }</div><div class="line"><a name="l00939"></a><span class="lineno"> 939</span>  <span class="keywordflow">case</span> PoolingParameter_PoolMethod_STOCHASTIC:</div><div class="line"><a name="l00940"></a><span class="lineno"> 940</span>  {</div><div class="line"><a name="l00941"></a><span class="lineno"> 941</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00942"></a><span class="lineno"> 942</span>  boost::str(</div><div class="line"><a name="l00943"></a><span class="lineno"> 943</span>  boost::format(</div><div class="line"><a name="l00944"></a><span class="lineno"> 944</span>  <span class="stringliteral">"Pooling Layer: Stochastic Pooling Not Supported. Layer=%1% %2%"</span>) %</div><div class="line"><a name="l00945"></a><span class="lineno"> 945</span>  layerParam.name() %</div><div class="line"><a name="l00946"></a><span class="lineno"> 946</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00947"></a><span class="lineno"> 947</span>  }</div><div class="line"><a name="l00948"></a><span class="lineno"> 948</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00949"></a><span class="lineno"> 949</span>  {</div><div class="line"><a name="l00950"></a><span class="lineno"> 950</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00951"></a><span class="lineno"> 951</span>  boost::str(</div><div class="line"><a name="l00952"></a><span class="lineno"> 952</span>  boost::format(</div><div class="line"><a name="l00953"></a><span class="lineno"> 953</span>  <span class="stringliteral">"Pooling Layer: unknown pooling method: %1% for layer: %2% %3%"</span>) %</div><div class="line"><a name="l00954"></a><span class="lineno"> 954</span>  p %</div><div class="line"><a name="l00955"></a><span class="lineno"> 955</span>  layerParam.name() %</div><div class="line"><a name="l00956"></a><span class="lineno"> 956</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00957"></a><span class="lineno"> 957</span>  }</div><div class="line"><a name="l00958"></a><span class="lineno"> 958</span>  }</div><div class="line"><a name="l00959"></a><span class="lineno"> 959</span>  }</div><div class="line"><a name="l00960"></a><span class="lineno"> 960</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00961"></a><span class="lineno"> 961</span>  {</div><div class="line"><a name="l00962"></a><span class="lineno"> 962</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l00963"></a><span class="lineno"> 963</span>  boost::str(</div><div class="line"><a name="l00964"></a><span class="lineno"> 964</span>  boost::format(</div><div class="line"><a name="l00965"></a><span class="lineno"> 965</span>  <span class="stringliteral">"No Pooling Method Defined for %1% %2%"</span>) %</div><div class="line"><a name="l00966"></a><span class="lineno"> 966</span>  layerParam.name() %</div><div class="line"><a name="l00967"></a><span class="lineno"> 967</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l00968"></a><span class="lineno"> 968</span>  }</div><div class="line"><a name="l00969"></a><span class="lineno"> 969</span> </div><div class="line"><a name="l00970"></a><span class="lineno"> 970</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">m_PadLeft</a> = pad_w;</div><div class="line"><a name="l00971"></a><span class="lineno"> 971</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">m_PadRight</a> = pad_w;</div><div class="line"><a name="l00972"></a><span class="lineno"> 972</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a56b51f56cef50cdfa554258eecdab046">m_PadTop</a> = pad_h;</div><div class="line"><a name="l00973"></a><span class="lineno"> 973</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">m_PadBottom</a> = pad_h;</div><div class="line"><a name="l00974"></a><span class="lineno"> 974</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">m_StrideX</a> = stride_w;</div><div class="line"><a name="l00975"></a><span class="lineno"> 975</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">m_StrideY</a> = stride_h;</div><div class="line"><a name="l00976"></a><span class="lineno"> 976</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a6d8fb685cc1ff224f25aa127fcf62c86">m_PoolWidth</a> = kernel_w;</div><div class="line"><a name="l00977"></a><span class="lineno"> 977</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a5699e8606c37d18c03910b242cd1b010">m_PoolHeight</a> = kernel_h;</div><div class="line"><a name="l00978"></a><span class="lineno"> 978</span> </div><div class="line"><a name="l00979"></a><span class="lineno"> 979</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#affb5b68b3eba3ed45a06c7cde7781962">m_OutputShapeRounding</a> = OutputShapeRounding::Ceiling;</div><div class="line"><a name="l00980"></a><span class="lineno"> 980</span>  pooling2dDescriptor.<a class="code" href="structarmnn_1_1_pooling2d_descriptor.xhtml#a8c29d6ea9b4186d69aad5961c910939c">m_PaddingMethod</a> = PaddingMethod::IgnoreValue;</div><div class="line"><a name="l00981"></a><span class="lineno"> 981</span> </div><div class="line"><a name="l00982"></a><span class="lineno"> 982</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* poolingLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddPooling2dLayer(pooling2dDescriptor,</div><div class="line"><a name="l00983"></a><span class="lineno"> 983</span>  layerParam.name().c_str());</div><div class="line"><a name="l00984"></a><span class="lineno"> 984</span> </div><div class="line"><a name="l00985"></a><span class="lineno"> 985</span>  <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a> outputInfo(</div><div class="line"><a name="l00986"></a><span class="lineno"> 986</span>  { inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[0],</div><div class="line"><a name="l00987"></a><span class="lineno"> 987</span>  inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1],</div><div class="line"><a name="l00988"></a><span class="lineno"> 988</span>  <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(ceil(</div><div class="line"><a name="l00989"></a><span class="lineno"> 989</span>  static_cast<float>(inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[2] + 2 * pad_h - kernel_h) /</div><div class="line"><a name="l00990"></a><span class="lineno"> 990</span>  boost::numeric_cast<float>(stride_h))) + 1,</div><div class="line"><a name="l00991"></a><span class="lineno"> 991</span>  <span class="keyword">static_cast<</span><span class="keywordtype">unsigned</span> <span class="keywordtype">int</span><span class="keyword">></span>(ceil(</div><div class="line"><a name="l00992"></a><span class="lineno"> 992</span>  static_cast<float>(inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[3] + 2 * pad_w - kernel_w) /</div><div class="line"><a name="l00993"></a><span class="lineno"> 993</span>  boost::numeric_cast<float>(stride_w))) + 1 },</div><div class="line"><a name="l00994"></a><span class="lineno"> 994</span>  DataType::Float32);</div><div class="line"><a name="l00995"></a><span class="lineno"> 995</span> </div><div class="line"><a name="l00996"></a><span class="lineno"> 996</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(poolingLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l00997"></a><span class="lineno"> 997</span>  poolingLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(outputInfo);</div><div class="line"><a name="l00998"></a><span class="lineno"> 998</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), poolingLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l00999"></a><span class="lineno"> 999</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1338 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_aa9e49717ebdb741e8c767741647fc618"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#aa9e49717ebdb741e8c767741647fc618">armnn::Pooling2dDescriptor::m_PadBottom</a></div><div class="ttdeci">uint32_t m_PadBottom</div><div class="ttdoc">Padding bottom value in the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00355">Descriptors.hpp:355</a></div></div> |
| 1339 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 1340 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_ac18546ebbebbb32fe0a03baa9bf2c600"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#ac18546ebbebbb32fe0a03baa9bf2c600">armnn::Pooling2dDescriptor::m_PadLeft</a></div><div class="ttdeci">uint32_t m_PadLeft</div><div class="ttdoc">Padding left value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00349">Descriptors.hpp:349</a></div></div> |
| 1341 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1342 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1343 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a6d8fb685cc1ff224f25aa127fcf62c86"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a6d8fb685cc1ff224f25aa127fcf62c86">armnn::Pooling2dDescriptor::m_PoolWidth</a></div><div class="ttdeci">uint32_t m_PoolWidth</div><div class="ttdoc">Pooling width value. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00357">Descriptors.hpp:357</a></div></div> |
| 1344 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a8c29d6ea9b4186d69aad5961c910939c"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a8c29d6ea9b4186d69aad5961c910939c">armnn::Pooling2dDescriptor::m_PaddingMethod</a></div><div class="ttdeci">PaddingMethod m_PaddingMethod</div><div class="ttdoc">The padding method to be used. (Exclude, IgnoreValue). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00367">Descriptors.hpp:367</a></div></div> |
| 1345 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a56b51f56cef50cdfa554258eecdab046"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a56b51f56cef50cdfa554258eecdab046">armnn::Pooling2dDescriptor::m_PadTop</a></div><div class="ttdeci">uint32_t m_PadTop</div><div class="ttdoc">Padding top value in the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00353">Descriptors.hpp:353</a></div></div> |
| 1346 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_afe6a3377c4531315354def9023c8fdda"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#afe6a3377c4531315354def9023c8fdda">armnn::Pooling2dDescriptor::m_StrideX</a></div><div class="ttdeci">uint32_t m_StrideX</div><div class="ttdoc">Stride value when proceeding through input for the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00361">Descriptors.hpp:361</a></div></div> |
| 1347 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1348 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a5699e8606c37d18c03910b242cd1b010"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a5699e8606c37d18c03910b242cd1b010">armnn::Pooling2dDescriptor::m_PoolHeight</a></div><div class="ttdeci">uint32_t m_PoolHeight</div><div class="ttdoc">Pooling height value. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00359">Descriptors.hpp:359</a></div></div> |
| 1349 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a002bc30e590d78cbb4f4d12171055ca7"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a002bc30e590d78cbb4f4d12171055ca7">armnn::Pooling2dDescriptor::m_PadRight</a></div><div class="ttdeci">uint32_t m_PadRight</div><div class="ttdoc">Padding right value in the width dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00351">Descriptors.hpp:351</a></div></div> |
| 1350 | <div class="ttc" id="_caffe_parser_8cpp_xhtml_a69f4a692d0095f6b19b0cd99cd75e465"><div class="ttname"><a href="_caffe_parser_8cpp.xhtml#a69f4a692d0095f6b19b0cd99cd75e465">GET_OPTIONAL_WITH_FALLBACK</a></div><div class="ttdeci">#define GET_OPTIONAL_WITH_FALLBACK(PARAM, PARAM_TYPE, OPTIONAL_VALUE, FALLBACK_VALUE, VALUE_TYPE, DEFAULT_VALUE)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l00208">CaffeParser.cpp:208</a></div></div> |
| 1351 | <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> |
| 1352 | <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> |
| 1353 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_a0031997bf43bd2747656c31e4977793a"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#a0031997bf43bd2747656c31e4977793a">armnn::Pooling2dDescriptor::m_PoolType</a></div><div class="ttdeci">PoolingAlgorithm m_PoolType</div><div class="ttdoc">The pooling algorithm to use (Max. Average, L2). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00347">Descriptors.hpp:347</a></div></div> |
| 1354 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_affb5b68b3eba3ed45a06c7cde7781962"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#affb5b68b3eba3ed45a06c7cde7781962">armnn::Pooling2dDescriptor::m_OutputShapeRounding</a></div><div class="ttdeci">OutputShapeRounding m_OutputShapeRounding</div><div class="ttdoc">The rounding method for the output shape. (Floor, Ceiling). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00365">Descriptors.hpp:365</a></div></div> |
| 1355 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1356 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1357 | <div class="ttc" id="namespacearmnn_xhtml_a961bbfe1db71a848eff5a1f0ab775718a6a061313d22e51e0f25b7cd4dc065233"><div class="ttname"><a href="namespacearmnn.xhtml#a961bbfe1db71a848eff5a1f0ab775718a6a061313d22e51e0f25b7cd4dc065233">armnn::PoolingAlgorithm::Max</a></div></div> |
| 1358 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1359 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1360 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml">armnn::Pooling2dDescriptor</a></div><div class="ttdoc">A Pooling2dDescriptor for the Pooling2dLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00313">Descriptors.hpp:313</a></div></div> |
| 1361 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1362 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1363 | <div class="ttc" id="structarmnn_1_1_pooling2d_descriptor_xhtml_ac1fe174bbadfb39a2b636940c2e647c8"><div class="ttname"><a href="structarmnn_1_1_pooling2d_descriptor.xhtml#ac1fe174bbadfb39a2b636940c2e647c8">armnn::Pooling2dDescriptor::m_StrideY</a></div><div class="ttdeci">uint32_t m_StrideY</div><div class="ttdoc">Stride value when proceeding through input for the height dimension. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00363">Descriptors.hpp:363</a></div></div> |
| 1364 | </div><!-- fragment --> |
| 1365 | </div> |
| 1366 | </div> |
| 1367 | <a id="a8449e66d395c0525561e3c67b100bafe"></a> |
| 1368 | <h2 class="memtitle"><span class="permalink"><a href="#a8449e66d395c0525561e3c67b100bafe">◆ </a></span>ParseReluLayer()</h2> |
| 1369 | |
| 1370 | <div class="memitem"> |
| 1371 | <div class="memproto"> |
| 1372 | <table class="mlabels"> |
| 1373 | <tr> |
| 1374 | <td class="mlabels-left"> |
| 1375 | <table class="memname"> |
| 1376 | <tr> |
| 1377 | <td class="memname">void ParseReluLayer </td> |
| 1378 | <td>(</td> |
| 1379 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1380 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1381 | <td></td> |
| 1382 | </tr> |
| 1383 | </table> |
| 1384 | </td> |
| 1385 | <td class="mlabels-right"> |
| 1386 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1387 | </tr> |
| 1388 | </table> |
| 1389 | </div><div class="memdoc"> |
| 1390 | |
| 1391 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01001">1001</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1392 | |
| 1393 | <p class="reference">References <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00037">ActivationDescriptor::m_A</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00035">ActivationDescriptor::m_Function</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1394 | <div class="fragment"><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span> {</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span> </div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>  <span class="keyword">const</span> <span class="keywordtype">string</span>& name = layerParam.name();</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>  <span class="keyword">const</span> ReLUParameter& param = layerParam.relu_param();</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span> </div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>  <a class="code" href="structarmnn_1_1_activation_descriptor.xhtml">ActivationDescriptor</a> activationDescriptor;</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>  <span class="keyword">const</span> <span class="keywordtype">float</span> negativeSlope = param.negative_slope();</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>  <span class="keywordflow">if</span> (negativeSlope == 0.0f)</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>  {</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>  activationDescriptor.<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml#af10fa7883e3579950f477bee92a64844">m_Function</a> = ActivationFunction::ReLu;</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>  }</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>  {</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>  activationDescriptor.<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml#af10fa7883e3579950f477bee92a64844">m_Function</a> = ActivationFunction::LeakyReLu;</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>  activationDescriptor.<a class="code" href="structarmnn_1_1_activation_descriptor.xhtml#a017b2990003a014234f13e999dc7c689">m_A</a> = negativeSlope;</div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>  }</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span> </div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">IConnectableLayer</a>* <span class="keyword">const</span> activationLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddActivationLayer(activationDescriptor, name.c_str());</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(activationLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>  activationLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), activationLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1395 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1396 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1397 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1398 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml">armnn::ActivationDescriptor</a></div><div class="ttdoc">An ActivationDescriptor for the ActivationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00020">Descriptors.hpp:20</a></div></div> |
| 1399 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml_a017b2990003a014234f13e999dc7c689"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml#a017b2990003a014234f13e999dc7c689">armnn::ActivationDescriptor::m_A</a></div><div class="ttdeci">float m_A</div><div class="ttdoc">Alpha upper bound value used by the activation functions. (BoundedReLu, Linear, TanH). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00037">Descriptors.hpp:37</a></div></div> |
| 1400 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1401 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1402 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1403 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1404 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1405 | <div class="ttc" id="structarmnn_1_1_activation_descriptor_xhtml_af10fa7883e3579950f477bee92a64844"><div class="ttname"><a href="structarmnn_1_1_activation_descriptor.xhtml#af10fa7883e3579950f477bee92a64844">armnn::ActivationDescriptor::m_Function</a></div><div class="ttdeci">ActivationFunction m_Function</div><div class="ttdoc">The activation function to use (Sigmoid, TanH, Linear, ReLu, BoundedReLu, SoftReLu, LeakyReLu, Abs, Sqrt, Square). </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00035">Descriptors.hpp:35</a></div></div> |
| 1406 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1407 | </div><!-- fragment --> |
| 1408 | </div> |
| 1409 | </div> |
| 1410 | <a id="a95799625a4aae0ed73838cbfa3530c1b"></a> |
| 1411 | <h2 class="memtitle"><span class="permalink"><a href="#a95799625a4aae0ed73838cbfa3530c1b">◆ </a></span>ParseScaleLayer()</h2> |
| 1412 | |
| 1413 | <div class="memitem"> |
| 1414 | <div class="memproto"> |
| 1415 | <table class="mlabels"> |
| 1416 | <tr> |
| 1417 | <td class="mlabels-left"> |
| 1418 | <table class="memname"> |
| 1419 | <tr> |
| 1420 | <td class="memname">void ParseScaleLayer </td> |
| 1421 | <td>(</td> |
| 1422 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1423 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1424 | <td></td> |
| 1425 | </tr> |
| 1426 | </table> |
| 1427 | </td> |
| 1428 | <td class="mlabels-right"> |
| 1429 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1430 | </tr> |
| 1431 | </table> |
| 1432 | </div><div class="memdoc"> |
| 1433 | |
| 1434 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01404">1404</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1435 | |
| 1436 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00088">TensorInfo::GetShape()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00623">BatchNormalizationDescriptor::m_Eps</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1437 | <div class="fragment"><div class="line"><a name="l01405"></a><span class="lineno"> 1405</span> {</div><div class="line"><a name="l01406"></a><span class="lineno"> 1406</span>  <span class="comment">// Current unoptimal solution: add a batchnormalization layer with 0 mean and 1 variance.</span></div><div class="line"><a name="l01407"></a><span class="lineno"> 1407</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01408"></a><span class="lineno"> 1408</span> </div><div class="line"><a name="l01409"></a><span class="lineno"> 1409</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01410"></a><span class="lineno"> 1410</span> </div><div class="line"><a name="l01411"></a><span class="lineno"> 1411</span>  <span class="keywordtype">string</span> name = layerParam.name();</div><div class="line"><a name="l01412"></a><span class="lineno"> 1412</span> </div><div class="line"><a name="l01413"></a><span class="lineno"> 1413</span>  ScaleParameter param = layerParam.scale_param();</div><div class="line"><a name="l01414"></a><span class="lineno"> 1414</span>  <span class="keywordflow">if</span> (param.axis() != 1)</div><div class="line"><a name="l01415"></a><span class="lineno"> 1415</span>  {</div><div class="line"><a name="l01416"></a><span class="lineno"> 1416</span>  <span class="comment">// Would have to use something other than BatchNormalizationLayer in this case</span></div><div class="line"><a name="l01417"></a><span class="lineno"> 1417</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01418"></a><span class="lineno"> 1418</span>  boost::str(</div><div class="line"><a name="l01419"></a><span class="lineno"> 1419</span>  boost::format(</div><div class="line"><a name="l01420"></a><span class="lineno"> 1420</span>  <span class="stringliteral">"Loading Scale Layer: Only axis 1 is supported currently. "</span></div><div class="line"><a name="l01421"></a><span class="lineno"> 1421</span>  <span class="stringliteral">"Layer=%1% Axis=%2% %3%"</span>) %</div><div class="line"><a name="l01422"></a><span class="lineno"> 1422</span>  layerParam.name() %</div><div class="line"><a name="l01423"></a><span class="lineno"> 1423</span>  param.axis() %</div><div class="line"><a name="l01424"></a><span class="lineno"> 1424</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01425"></a><span class="lineno"> 1425</span>  }</div><div class="line"><a name="l01426"></a><span class="lineno"> 1426</span> </div><div class="line"><a name="l01427"></a><span class="lineno"> 1427</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channels = inputInfo.<a class="code" href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">GetShape</a>()[1];</div><div class="line"><a name="l01428"></a><span class="lineno"> 1428</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> shape[] = {channels};</div><div class="line"><a name="l01429"></a><span class="lineno"> 1429</span> </div><div class="line"><a name="l01430"></a><span class="lineno"> 1430</span>  <a class="code" href="structarmnn_1_1_batch_normalization_descriptor.xhtml">BatchNormalizationDescriptor</a> desc;</div><div class="line"><a name="l01431"></a><span class="lineno"> 1431</span>  desc.<a class="code" href="structarmnn_1_1_batch_normalization_descriptor.xhtml#a11c821c7524251004a72ed13c510853c">m_Eps</a> = 0.0f; <span class="comment">// Don't need epsilon if variance is 1.</span></div><div class="line"><a name="l01432"></a><span class="lineno"> 1432</span>  vector<float> meanData(channels, 0.0f);</div><div class="line"><a name="l01433"></a><span class="lineno"> 1433</span>  vector<float> varianceData(channels, 1.0f);</div><div class="line"><a name="l01434"></a><span class="lineno"> 1434</span>  vector<float> betaData(channels, 0.0f);</div><div class="line"><a name="l01435"></a><span class="lineno"> 1435</span>  vector<float> gammaData(channels);</div><div class="line"><a name="l01436"></a><span class="lineno"> 1436</span> </div><div class="line"><a name="l01437"></a><span class="lineno"> 1437</span>  GetDataFromBlob(layerParam, gammaData, 0);</div><div class="line"><a name="l01438"></a><span class="lineno"> 1438</span> </div><div class="line"><a name="l01439"></a><span class="lineno"> 1439</span>  <span class="keywordflow">if</span>(param.has_bias_term())</div><div class="line"><a name="l01440"></a><span class="lineno"> 1440</span>  {</div><div class="line"><a name="l01441"></a><span class="lineno"> 1441</span>  GetDataFromBlob(layerParam, betaData, 1);</div><div class="line"><a name="l01442"></a><span class="lineno"> 1442</span>  }</div><div class="line"><a name="l01443"></a><span class="lineno"> 1443</span> </div><div class="line"><a name="l01444"></a><span class="lineno"> 1444</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> mean(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), meanData);</div><div class="line"><a name="l01445"></a><span class="lineno"> 1445</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> variance(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), varianceData);</div><div class="line"><a name="l01446"></a><span class="lineno"> 1446</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> beta(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), betaData);</div><div class="line"><a name="l01447"></a><span class="lineno"> 1447</span>  <a class="code" href="classarmnn_1_1_const_tensor.xhtml">ConstTensor</a> gamma(<a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>(1, shape, <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a>), gammaData);</div><div class="line"><a name="l01448"></a><span class="lineno"> 1448</span> </div><div class="line"><a name="l01449"></a><span class="lineno"> 1449</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* <span class="keyword">const</span> batchNormLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddBatchNormalizationLayer(desc,</div><div class="line"><a name="l01450"></a><span class="lineno"> 1450</span>  mean, variance, beta, gamma, name.c_str());</div><div class="line"><a name="l01451"></a><span class="lineno"> 1451</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01452"></a><span class="lineno"> 1452</span>  batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01453"></a><span class="lineno"> 1453</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), batchNormLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01454"></a><span class="lineno"> 1454</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1438 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml_a8b5d0f8a24e9d9238f412260a552acf8"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml#a8b5d0f8a24e9d9238f412260a552acf8">armnn::TensorInfo::GetShape</a></div><div class="ttdeci">const TensorShape & GetShape() const</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00088">Tensor.hpp:88</a></div></div> |
| 1439 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1440 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1441 | <div class="ttc" id="structarmnn_1_1_batch_normalization_descriptor_xhtml_a11c821c7524251004a72ed13c510853c"><div class="ttname"><a href="structarmnn_1_1_batch_normalization_descriptor.xhtml#a11c821c7524251004a72ed13c510853c">armnn::BatchNormalizationDescriptor::m_Eps</a></div><div class="ttdeci">float m_Eps</div><div class="ttdoc">Value to add to the variance. Used to avoid dividing by zero. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00623">Descriptors.hpp:623</a></div></div> |
| 1442 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1443 | <div class="ttc" id="classarmnn_1_1_const_tensor_xhtml"><div class="ttname"><a href="classarmnn_1_1_const_tensor.xhtml">armnn::ConstTensor</a></div><div class="ttdoc">A tensor defined by a TensorInfo (shape and data type) and an immutable backing store. </div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00199">Tensor.hpp:199</a></div></div> |
| 1444 | <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> |
| 1445 | <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> |
| 1446 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1447 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1448 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 1449 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1450 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1451 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1452 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1453 | <div class="ttc" id="structarmnn_1_1_batch_normalization_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_batch_normalization_descriptor.xhtml">armnn::BatchNormalizationDescriptor</a></div><div class="ttdoc">A BatchNormalizationDescriptor for the BatchNormalizationLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00610">Descriptors.hpp:610</a></div></div> |
| 1454 | </div><!-- fragment --> |
| 1455 | </div> |
| 1456 | </div> |
| 1457 | <a id="a1c0594bf03dfbb44029465d3466127b3"></a> |
| 1458 | <h2 class="memtitle"><span class="permalink"><a href="#a1c0594bf03dfbb44029465d3466127b3">◆ </a></span>ParseSoftmaxLayer()</h2> |
| 1459 | |
| 1460 | <div class="memitem"> |
| 1461 | <div class="memproto"> |
| 1462 | <table class="mlabels"> |
| 1463 | <tr> |
| 1464 | <td class="mlabels-left"> |
| 1465 | <table class="memname"> |
| 1466 | <tr> |
| 1467 | <td class="memname">void ParseSoftmaxLayer </td> |
| 1468 | <td>(</td> |
| 1469 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1470 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1471 | <td></td> |
| 1472 | </tr> |
| 1473 | </table> |
| 1474 | </td> |
| 1475 | <td class="mlabels-right"> |
| 1476 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1477 | </tr> |
| 1478 | </table> |
| 1479 | </div><div class="memdoc"> |
| 1480 | |
| 1481 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01208">1208</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1482 | |
| 1483 | <p class="reference">References <a class="el" href="_test_utils_8cpp_source.xhtml#l00012">Connect()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">IConnectableLayer::GetInputSlot()</a>, <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">IConnectableLayer::GetOutputSlot()</a>, <a class="el" href="_tensor_utils_8cpp_source.xhtml#l00038">armnnUtils::GetTensorInfo()</a>, <a class="el" href="_descriptors_8hpp_source.xhtml#l00138">SoftmaxDescriptor::m_Axis</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParserBase::m_Network</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">IOutputSlot::SetTensorInfo()</a>.</p> |
| 1484 | <div class="fragment"><div class="line"><a name="l01209"></a><span class="lineno"> 1209</span> {</div><div class="line"><a name="l01210"></a><span class="lineno"> 1210</span>  ValidateNumInputsOutputs(layerParam, 1, 1);</div><div class="line"><a name="l01211"></a><span class="lineno"> 1211</span> </div><div class="line"><a name="l01212"></a><span class="lineno"> 1212</span>  SoftmaxParameter param = layerParam.softmax_param();</div><div class="line"><a name="l01213"></a><span class="lineno"> 1213</span> </div><div class="line"><a name="l01214"></a><span class="lineno"> 1214</span>  <span class="keyword">const</span> <a class="code" href="classarmnn_1_1_tensor_info.xhtml">TensorInfo</a>& inputInfo = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">GetTensorInfo</a>();</div><div class="line"><a name="l01215"></a><span class="lineno"> 1215</span> </div><div class="line"><a name="l01216"></a><span class="lineno"> 1216</span>  <span class="comment">// Ignored Caffe Parameters:</span></div><div class="line"><a name="l01217"></a><span class="lineno"> 1217</span>  <span class="comment">// axis</span></div><div class="line"><a name="l01218"></a><span class="lineno"> 1218</span>  <span class="comment">// Engine</span></div><div class="line"><a name="l01219"></a><span class="lineno"> 1219</span> </div><div class="line"><a name="l01220"></a><span class="lineno"> 1220</span>  <a class="code" href="structarmnn_1_1_softmax_descriptor.xhtml">armnn::SoftmaxDescriptor</a> softmaxDescriptor;</div><div class="line"><a name="l01221"></a><span class="lineno"> 1221</span>  softmaxDescriptor.<a class="code" href="structarmnn_1_1_softmax_descriptor.xhtml#a214c3636fdf0ea5bac8edb42d0e6c7f0">m_Axis</a> = 1;</div><div class="line"><a name="l01222"></a><span class="lineno"> 1222</span>  <a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a>* <span class="keyword">const</span> softmaxLayer = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">m_Network</a>->AddSoftmaxLayer(</div><div class="line"><a name="l01223"></a><span class="lineno"> 1223</span>  softmaxDescriptor,</div><div class="line"><a name="l01224"></a><span class="lineno"> 1224</span>  layerParam.name().c_str());</div><div class="line"><a name="l01225"></a><span class="lineno"> 1225</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0)).<a class="code" href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a>(softmaxLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">GetInputSlot</a>(0));</div><div class="line"><a name="l01226"></a><span class="lineno"> 1226</span>  softmaxLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0).<a class="code" href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">SetTensorInfo</a>(inputInfo);</div><div class="line"><a name="l01227"></a><span class="lineno"> 1227</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(0), softmaxLayer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">GetOutputSlot</a>(0));</div><div class="line"><a name="l01228"></a><span class="lineno"> 1228</span> }</div><div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a></div><div class="ttdoc">Interface for a layer that is connectable to other layers via InputSlots and OutputSlots. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00061">INetwork.hpp:61</a></div></div> |
| 1485 | <div class="ttc" id="structarmnn_1_1_softmax_descriptor_xhtml_a214c3636fdf0ea5bac8edb42d0e6c7f0"><div class="ttname"><a href="structarmnn_1_1_softmax_descriptor.xhtml#a214c3636fdf0ea5bac8edb42d0e6c7f0">armnn::SoftmaxDescriptor::m_Axis</a></div><div class="ttdeci">int m_Axis</div><div class="ttdoc">Scalar, defaulted to the last index (-1), specifying the dimension the activation will be performed o...</div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00138">Descriptors.hpp:138</a></div></div> |
| 1486 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1487 | <div class="ttc" id="classarmnn_1_1_tensor_info_xhtml"><div class="ttname"><a href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a></div><div class="ttdef"><b>Definition:</b> <a href="_tensor_8hpp_source.xhtml#l00053">Tensor.hpp:53</a></div></div> |
| 1488 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml_a5ee4a6c9a2481245487b1b1a70d20fd0"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml#a5ee4a6c9a2481245487b1b1a70d20fd0">armnn::IOutputSlot::SetTensorInfo</a></div><div class="ttdeci">virtual void SetTensorInfo(const TensorInfo &tensorInfo)=0</div></div> |
| 1489 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a6ec9e0eb66d7d6a01240492a0b18104c"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a6ec9e0eb66d7d6a01240492a0b18104c">armnn::IConnectableLayer::GetInputSlot</a></div><div class="ttdeci">virtual const IInputSlot & GetInputSlot(unsigned int index) const =0</div><div class="ttdoc">Get a const input slot handle by slot index. </div></div> |
| 1490 | <div class="ttc" id="namespacearmnn_utils_xhtml_acee63cd08da47910fc166a1990988fa8"><div class="ttname"><a href="namespacearmnn_utils.xhtml#acee63cd08da47910fc166a1990988fa8">armnnUtils::GetTensorInfo</a></div><div class="ttdeci">armnn::TensorInfo GetTensorInfo(unsigned int numberOfBatches, unsigned int numberOfChannels, unsigned int height, unsigned int width, const armnn::DataLayout dataLayout, const armnn::DataType dataType)</div><div class="ttdef"><b>Definition:</b> <a href="_tensor_utils_8cpp_source.xhtml#l00038">TensorUtils.cpp:38</a></div></div> |
| 1491 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_a80ac4eda2e7f2757ec9dd96fc96dbd16"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#a80ac4eda2e7f2757ec9dd96fc96dbd16">armnn::IConnectableLayer::GetOutputSlot</a></div><div class="ttdeci">virtual const IOutputSlot & GetOutputSlot(unsigned int index) const =0</div><div class="ttdoc">Get the const output slot handle by slot index. </div></div> |
| 1492 | <div class="ttc" id="_test_utils_8cpp_xhtml_a0b295acb179f15eb3fb862b32008f782"><div class="ttname"><a href="_test_utils_8cpp.xhtml#a0b295acb179f15eb3fb862b32008f782">Connect</a></div><div class="ttdeci">void Connect(armnn::IConnectableLayer *from, armnn::IConnectableLayer *to, const armnn::TensorInfo &tensorInfo, unsigned int fromIndex, unsigned int toIndex)</div><div class="ttdef"><b>Definition:</b> <a href="_test_utils_8cpp_source.xhtml#l00012">TestUtils.cpp:12</a></div></div> |
| 1493 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1494 | <div class="ttc" id="structarmnn_1_1_softmax_descriptor_xhtml"><div class="ttname"><a href="structarmnn_1_1_softmax_descriptor.xhtml">armnn::SoftmaxDescriptor</a></div><div class="ttdoc">A SoftmaxDescriptor for the SoftmaxLayer. </div><div class="ttdef"><b>Definition:</b> <a href="_descriptors_8hpp_source.xhtml#l00123">Descriptors.hpp:123</a></div></div> |
| 1495 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a2db3ae8d422f17d455e0ba0cb6291d2a"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a2db3ae8d422f17d455e0ba0cb6291d2a">armnnCaffeParser::CaffeParserBase::m_Network</a></div><div class="ttdeci">armnn::INetworkPtr m_Network</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00126">CaffeParser.hpp:126</a></div></div> |
| 1496 | </div><!-- fragment --> |
| 1497 | </div> |
| 1498 | </div> |
| 1499 | <a id="a3311e9dc3436fe83ef22c5f530fd3234"></a> |
| 1500 | <h2 class="memtitle"><span class="permalink"><a href="#a3311e9dc3436fe83ef22c5f530fd3234">◆ </a></span>ParseSplitLayer()</h2> |
| 1501 | |
| 1502 | <div class="memitem"> |
| 1503 | <div class="memproto"> |
| 1504 | <table class="mlabels"> |
| 1505 | <tr> |
| 1506 | <td class="mlabels-left"> |
| 1507 | <table class="memname"> |
| 1508 | <tr> |
| 1509 | <td class="memname">void ParseSplitLayer </td> |
| 1510 | <td>(</td> |
| 1511 | <td class="paramtype">const caffe::LayerParameter & </td> |
| 1512 | <td class="paramname"><em>layerParam</em></td><td>)</td> |
| 1513 | <td></td> |
| 1514 | </tr> |
| 1515 | </table> |
| 1516 | </td> |
| 1517 | <td class="mlabels-right"> |
| 1518 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1519 | </tr> |
| 1520 | </table> |
| 1521 | </div><div class="memdoc"> |
| 1522 | |
| 1523 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01456">1456</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1524 | |
| 1525 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>.</p> |
| 1526 | <div class="fragment"><div class="line"><a name="l01457"></a><span class="lineno"> 1457</span> {</div><div class="line"><a name="l01458"></a><span class="lineno"> 1458</span>  <span class="comment">// Used in caffe to duplicate memory - not necessary in armnn.</span></div><div class="line"><a name="l01459"></a><span class="lineno"> 1459</span>  <span class="keywordflow">if</span> (layerParam.bottom_size() != 1)</div><div class="line"><a name="l01460"></a><span class="lineno"> 1460</span>  {</div><div class="line"><a name="l01461"></a><span class="lineno"> 1461</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01462"></a><span class="lineno"> 1462</span>  boost::str(</div><div class="line"><a name="l01463"></a><span class="lineno"> 1463</span>  boost::format(</div><div class="line"><a name="l01464"></a><span class="lineno"> 1464</span>  <span class="stringliteral">"Split layer '%1%' should have exactly 1 bottom. "</span></div><div class="line"><a name="l01465"></a><span class="lineno"> 1465</span>  <span class="stringliteral">"#bottoms=%2% %3%"</span>) %</div><div class="line"><a name="l01466"></a><span class="lineno"> 1466</span>  layerParam.name() %</div><div class="line"><a name="l01467"></a><span class="lineno"> 1467</span>  layerParam.bottom_size() %</div><div class="line"><a name="l01468"></a><span class="lineno"> 1468</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</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>  <a class="code" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>& outputSlot = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">GetArmnnOutputSlotForCaffeTop</a>(layerParam.bottom(0));</div><div class="line"><a name="l01471"></a><span class="lineno"> 1471</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < layerParam.top_size(); i++)</div><div class="line"><a name="l01472"></a><span class="lineno"> 1472</span>  {</div><div class="line"><a name="l01473"></a><span class="lineno"> 1473</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">SetArmnnOutputSlotForCaffeTop</a>(layerParam.top(i), outputSlot);</div><div class="line"><a name="l01474"></a><span class="lineno"> 1474</span>  }</div><div class="line"><a name="l01475"></a><span class="lineno"> 1475</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9650b8810d4e6734b255ca25d495fe06"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9650b8810d4e6734b255ca25d495fe06">armnnCaffeParser::CaffeParserBase::GetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">armnn::IOutputSlot & GetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName) const</div><div class="ttdoc">Retrieves the Armnn IOutputSlot representing the given Caffe top. </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParser.cpp:1533</a></div></div> |
| 1527 | <div class="ttc" id="classarmnn_1_1_i_output_slot_xhtml"><div class="ttname"><a href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a></div><div class="ttdoc">An output connection slot for a layer. </div><div class="ttdef"><b>Definition:</b> <a href="_i_network_8hpp_source.xhtml#l00037">INetwork.hpp:37</a></div></div> |
| 1528 | <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> |
| 1529 | <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> |
| 1530 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a0767b1c7ee9cbd014fd97c701a954caa"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a0767b1c7ee9cbd014fd97c701a954caa">armnnCaffeParser::CaffeParserBase::SetArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">void SetArmnnOutputSlotForCaffeTop(const std::string &caffeTopName, armnn::IOutputSlot &armnnOutputSlot)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParser.cpp:1551</a></div></div> |
| 1531 | </div><!-- fragment --> |
| 1532 | </div> |
| 1533 | </div> |
| 1534 | <a id="a89631aa06b5c628c46674c202b40dbc5"></a> |
| 1535 | <h2 class="memtitle"><span class="permalink"><a href="#a89631aa06b5c628c46674c202b40dbc5">◆ </a></span>ResolveInPlaceLayers()</h2> |
| 1536 | |
| 1537 | <div class="memitem"> |
| 1538 | <div class="memproto"> |
| 1539 | <table class="mlabels"> |
| 1540 | <tr> |
| 1541 | <td class="mlabels-left"> |
| 1542 | <table class="memname"> |
| 1543 | <tr> |
| 1544 | <td class="memname">void ResolveInPlaceLayers </td> |
| 1545 | <td>(</td> |
| 1546 | <td class="paramtype">caffe::NetParameter & </td> |
| 1547 | <td class="paramname"><em>netParameter</em></td><td>)</td> |
| 1548 | <td></td> |
| 1549 | </tr> |
| 1550 | </table> |
| 1551 | </td> |
| 1552 | <td class="mlabels-right"> |
| 1553 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1554 | </tr> |
| 1555 | </table> |
| 1556 | </div><div class="memdoc"> |
| 1557 | |
| 1558 | <p>Modifies the Caffe network to replace "in-place" layers (whose top() and bottom() are both the same) with regular layers. </p> |
| 1559 | <p>This simplifies further parsing. </p> |
| 1560 | |
| 1561 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01572">1572</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1562 | |
| 1563 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>.</p> |
| 1564 | |
| 1565 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 1566 | <div class="fragment"><div class="line"><a name="l01573"></a><span class="lineno"> 1573</span> {</div><div class="line"><a name="l01574"></a><span class="lineno"> 1574</span>  <span class="comment">// Finds layers with the same top.</span></div><div class="line"><a name="l01575"></a><span class="lineno"> 1575</span>  std::map<std::string, std::vector<caffe::LayerParameter*>> layersByTop;</div><div class="line"><a name="l01576"></a><span class="lineno"> 1576</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> layerIdx = 0; layerIdx < netParameter.layer_size(); ++layerIdx)</div><div class="line"><a name="l01577"></a><span class="lineno"> 1577</span>  {</div><div class="line"><a name="l01578"></a><span class="lineno"> 1578</span>  caffe::LayerParameter& layer = *netParameter.mutable_layer(layerIdx);</div><div class="line"><a name="l01579"></a><span class="lineno"> 1579</span>  std::string name = layer.name();</div><div class="line"><a name="l01580"></a><span class="lineno"> 1580</span>  <span class="keywordflow">for</span> (<span class="keywordtype">int</span> i = 0; i < layer.top_size(); ++i)</div><div class="line"><a name="l01581"></a><span class="lineno"> 1581</span>  {</div><div class="line"><a name="l01582"></a><span class="lineno"> 1582</span>  layersByTop[layer.top(i)].push_back(&layer);</div><div class="line"><a name="l01583"></a><span class="lineno"> 1583</span>  }</div><div class="line"><a name="l01584"></a><span class="lineno"> 1584</span>  }</div><div class="line"><a name="l01585"></a><span class="lineno"> 1585</span> </div><div class="line"><a name="l01586"></a><span class="lineno"> 1586</span>  <span class="comment">// For each set of layers with the same top, resolves them to a linear chain rather than in-place layers.</span></div><div class="line"><a name="l01587"></a><span class="lineno"> 1587</span>  <span class="comment">// Note that for 'regular' layers, there will be a single layer in each group and so this will be a no-op.</span></div><div class="line"><a name="l01588"></a><span class="lineno"> 1588</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span> layersWithSameTopIt : layersByTop)</div><div class="line"><a name="l01589"></a><span class="lineno"> 1589</span>  {</div><div class="line"><a name="l01590"></a><span class="lineno"> 1590</span>  <span class="keyword">const</span> std::string& top = layersWithSameTopIt.first;</div><div class="line"><a name="l01591"></a><span class="lineno"> 1591</span>  <span class="keyword">const</span> std::vector<caffe::LayerParameter*>& layersWithSameTop = layersWithSameTopIt.second;</div><div class="line"><a name="l01592"></a><span class="lineno"> 1592</span> </div><div class="line"><a name="l01593"></a><span class="lineno"> 1593</span>  <span class="comment">// Chains the layers together in the order that they are listed in the prototxt (hopefully this is correct).</span></div><div class="line"><a name="l01594"></a><span class="lineno"> 1594</span>  <span class="comment">// Note that the last layer will not have its top modified so that other layers will continue to reference it.</span></div><div class="line"><a name="l01595"></a><span class="lineno"> 1595</span>  <span class="keywordflow">for</span> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> layerIdx = 0; layerIdx < layersWithSameTop.size() - 1; ++layerIdx)</div><div class="line"><a name="l01596"></a><span class="lineno"> 1596</span>  {</div><div class="line"><a name="l01597"></a><span class="lineno"> 1597</span>  caffe::LayerParameter& layer1 = *layersWithSameTop[layerIdx];</div><div class="line"><a name="l01598"></a><span class="lineno"> 1598</span>  caffe::LayerParameter& layer2 = *layersWithSameTop[layerIdx+1];</div><div class="line"><a name="l01599"></a><span class="lineno"> 1599</span>  <span class="keywordflow">if</span> (layer1.top_size() != 1)</div><div class="line"><a name="l01600"></a><span class="lineno"> 1600</span>  {</div><div class="line"><a name="l01601"></a><span class="lineno"> 1601</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01602"></a><span class="lineno"> 1602</span>  boost::str(</div><div class="line"><a name="l01603"></a><span class="lineno"> 1603</span>  boost::format(</div><div class="line"><a name="l01604"></a><span class="lineno"> 1604</span>  <span class="stringliteral">"Node '%1%' is an in-place layer but doesn't have exactly one "</span></div><div class="line"><a name="l01605"></a><span class="lineno"> 1605</span>  <span class="stringliteral">"top. It has %2% instead. %3%"</span>) %</div><div class="line"><a name="l01606"></a><span class="lineno"> 1606</span>  layer1.name() %</div><div class="line"><a name="l01607"></a><span class="lineno"> 1607</span>  layer1.top_size() %</div><div class="line"><a name="l01608"></a><span class="lineno"> 1608</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01609"></a><span class="lineno"> 1609</span>  }</div><div class="line"><a name="l01610"></a><span class="lineno"> 1610</span>  std::string newTop = layer1.name() + <span class="stringliteral">"_top"</span>;</div><div class="line"><a name="l01611"></a><span class="lineno"> 1611</span>  layer1.set_top(0, newTop);</div><div class="line"><a name="l01612"></a><span class="lineno"> 1612</span>  <span class="keywordflow">if</span> (layer2.bottom_size() != 1 || layer2.bottom(0) != top)</div><div class="line"><a name="l01613"></a><span class="lineno"> 1613</span>  {</div><div class="line"><a name="l01614"></a><span class="lineno"> 1614</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01615"></a><span class="lineno"> 1615</span>  boost::str(</div><div class="line"><a name="l01616"></a><span class="lineno"> 1616</span>  boost::format(</div><div class="line"><a name="l01617"></a><span class="lineno"> 1617</span>  <span class="stringliteral">"Node '%1%' is an in-place layer but "</span></div><div class="line"><a name="l01618"></a><span class="lineno"> 1618</span>  <span class="stringliteral">"doesn't have exactly one bottom, or it doesn't match its top. "</span></div><div class="line"><a name="l01619"></a><span class="lineno"> 1619</span>  <span class="stringliteral">"#bottoms=%2%, first bottom is %3%, top is %4% %5%"</span>) %</div><div class="line"><a name="l01620"></a><span class="lineno"> 1620</span>  layer2.name() %</div><div class="line"><a name="l01621"></a><span class="lineno"> 1621</span>  layer2.bottom(0) %</div><div class="line"><a name="l01622"></a><span class="lineno"> 1622</span>  top %</div><div class="line"><a name="l01623"></a><span class="lineno"> 1623</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01624"></a><span class="lineno"> 1624</span>  }</div><div class="line"><a name="l01625"></a><span class="lineno"> 1625</span>  layer2.set_bottom(0, newTop);</div><div class="line"><a name="l01626"></a><span class="lineno"> 1626</span>  }</div><div class="line"><a name="l01627"></a><span class="lineno"> 1627</span>  }</div><div class="line"><a name="l01628"></a><span class="lineno"> 1628</span> }</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> |
| 1567 | <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> |
| 1568 | </div><!-- fragment --> |
| 1569 | </div> |
| 1570 | </div> |
| 1571 | <a id="a0767b1c7ee9cbd014fd97c701a954caa"></a> |
| 1572 | <h2 class="memtitle"><span class="permalink"><a href="#a0767b1c7ee9cbd014fd97c701a954caa">◆ </a></span>SetArmnnOutputSlotForCaffeTop()</h2> |
| 1573 | |
| 1574 | <div class="memitem"> |
| 1575 | <div class="memproto"> |
| 1576 | <table class="mlabels"> |
| 1577 | <tr> |
| 1578 | <td class="mlabels-left"> |
| 1579 | <table class="memname"> |
| 1580 | <tr> |
| 1581 | <td class="memname">void SetArmnnOutputSlotForCaffeTop </td> |
| 1582 | <td>(</td> |
| 1583 | <td class="paramtype">const std::string & </td> |
| 1584 | <td class="paramname"><em>caffeTopName</em>, </td> |
| 1585 | </tr> |
| 1586 | <tr> |
| 1587 | <td class="paramkey"></td> |
| 1588 | <td></td> |
| 1589 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a> & </td> |
| 1590 | <td class="paramname"><em>armnnOutputSlot</em> </td> |
| 1591 | </tr> |
| 1592 | <tr> |
| 1593 | <td></td> |
| 1594 | <td>)</td> |
| 1595 | <td></td><td></td> |
| 1596 | </tr> |
| 1597 | </table> |
| 1598 | </td> |
| 1599 | <td class="mlabels-right"> |
| 1600 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1601 | </tr> |
| 1602 | </table> |
| 1603 | </div><div class="memdoc"> |
| 1604 | |
| 1605 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">1551</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1606 | |
| 1607 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a>.</p> |
| 1608 | |
| 1609 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParserBase::AddConvLayerWithDepthwiseConv()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParserBase::AddConvLayerWithSplits()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01338">CaffeParserBase::ParseBatchNormLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01277">CaffeParserBase::ParseConcatLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01477">CaffeParserBase::ParseDropoutLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01230">CaffeParserBase::ParseEltwiseLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01134">CaffeParserBase::ParseInnerProductLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01027">CaffeParserBase::ParseLRNLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00883">CaffeParserBase::ParsePoolingLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01001">CaffeParserBase::ParseReluLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01404">CaffeParserBase::ParseScaleLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01208">CaffeParserBase::ParseSoftmaxLayer()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01456">CaffeParserBase::ParseSplitLayer()</a>.</p> |
| 1610 | <div class="fragment"><div class="line"><a name="l01553"></a><span class="lineno"> 1553</span> {</div><div class="line"><a name="l01554"></a><span class="lineno"> 1554</span>  <span class="keyword">auto</span> it = <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>.find(caffeTopName);</div><div class="line"><a name="l01555"></a><span class="lineno"> 1555</span>  <span class="keywordflow">if</span> (it == <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>.end())</div><div class="line"><a name="l01556"></a><span class="lineno"> 1556</span>  {</div><div class="line"><a name="l01557"></a><span class="lineno"> 1557</span>  <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">m_ArmnnOutputSlotForCaffeTop</a>[caffeTopName] = &armnnOutputSlot;</div><div class="line"><a name="l01558"></a><span class="lineno"> 1558</span>  }</div><div class="line"><a name="l01559"></a><span class="lineno"> 1559</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l01560"></a><span class="lineno"> 1560</span>  {</div><div class="line"><a name="l01561"></a><span class="lineno"> 1561</span>  <span class="keywordflow">throw</span> <a class="code" href="classarmnn_1_1_parse_exception.xhtml">ParseException</a>(</div><div class="line"><a name="l01562"></a><span class="lineno"> 1562</span>  boost::str(</div><div class="line"><a name="l01563"></a><span class="lineno"> 1563</span>  boost::format(</div><div class="line"><a name="l01564"></a><span class="lineno"> 1564</span>  <span class="stringliteral">"Attempting to add duplicate entry for Caffe top '%1%' %2%"</span>) %</div><div class="line"><a name="l01565"></a><span class="lineno"> 1565</span>  caffeTopName %</div><div class="line"><a name="l01566"></a><span class="lineno"> 1566</span>  <a class="code" href="_exceptions_8hpp.xhtml#aa3be76aec4ce713822a5ea1ecbb7bc61">CHECK_LOCATION</a>().AsString()));</div><div class="line"><a name="l01567"></a><span class="lineno"> 1567</span>  }</div><div class="line"><a name="l01568"></a><span class="lineno"> 1568</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a9c99d40a72e6f0c6e4ad92d21e44edca"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a9c99d40a72e6f0c6e4ad92d21e44edca">armnnCaffeParser::CaffeParserBase::m_ArmnnOutputSlotForCaffeTop</a></div><div class="ttdeci">std::unordered_map< std::string, armnn::IOutputSlot * > m_ArmnnOutputSlotForCaffeTop</div><div class="ttdoc">As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops...</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00131">CaffeParser.hpp:131</a></div></div> |
| 1611 | <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> |
| 1612 | <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> |
| 1613 | </div><!-- fragment --> |
| 1614 | </div> |
| 1615 | </div> |
| 1616 | <a id="a5f5e6255b21fdf458d3733bbdcdc4af5"></a> |
| 1617 | <h2 class="memtitle"><span class="permalink"><a href="#a5f5e6255b21fdf458d3733bbdcdc4af5">◆ </a></span>TrackBindingPoint()</h2> |
| 1618 | |
| 1619 | <div class="memitem"> |
| 1620 | <div class="memproto"> |
| 1621 | <table class="mlabels"> |
| 1622 | <tr> |
| 1623 | <td class="mlabels-left"> |
| 1624 | <table class="memname"> |
| 1625 | <tr> |
| 1626 | <td class="memname">void TrackBindingPoint </td> |
| 1627 | <td>(</td> |
| 1628 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> * </td> |
| 1629 | <td class="paramname"><em>layer</em>, </td> |
| 1630 | </tr> |
| 1631 | <tr> |
| 1632 | <td class="paramkey"></td> |
| 1633 | <td></td> |
| 1634 | <td class="paramtype"><a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> </td> |
| 1635 | <td class="paramname"><em>id</em>, </td> |
| 1636 | </tr> |
| 1637 | <tr> |
| 1638 | <td class="paramkey"></td> |
| 1639 | <td></td> |
| 1640 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> & </td> |
| 1641 | <td class="paramname"><em>tensorInfo</em>, </td> |
| 1642 | </tr> |
| 1643 | <tr> |
| 1644 | <td class="paramkey"></td> |
| 1645 | <td></td> |
| 1646 | <td class="paramtype">const char * </td> |
| 1647 | <td class="paramname"><em>bindingPointDesc</em>, </td> |
| 1648 | </tr> |
| 1649 | <tr> |
| 1650 | <td class="paramkey"></td> |
| 1651 | <td></td> |
| 1652 | <td class="paramtype">std::unordered_map< std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a> > & </td> |
| 1653 | <td class="paramname"><em>nameToBindingInfo</em> </td> |
| 1654 | </tr> |
| 1655 | <tr> |
| 1656 | <td></td> |
| 1657 | <td>)</td> |
| 1658 | <td></td><td></td> |
| 1659 | </tr> |
| 1660 | </table> |
| 1661 | </td> |
| 1662 | <td class="mlabels-right"> |
| 1663 | <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span> </td> |
| 1664 | </tr> |
| 1665 | </table> |
| 1666 | </div><div class="memdoc"> |
| 1667 | |
| 1668 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01509">1509</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1669 | |
| 1670 | <p class="reference">References <a class="el" href="_exceptions_8hpp_source.xhtml#l00192">CHECK_LOCATION</a>, and <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">IConnectableLayer::GetName()</a>.</p> |
| 1671 | |
| 1672 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01495">CaffeParserBase::TrackInputBinding()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01502">CaffeParserBase::TrackOutputBinding()</a>.</p> |
| 1673 | <div class="fragment"><div class="line"><a name="l01514"></a><span class="lineno"> 1514</span> {</div><div class="line"><a name="l01515"></a><span class="lineno"> 1515</span>  <span class="keyword">const</span> std::string layerName = layer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">GetName</a>();</div><div class="line"><a name="l01516"></a><span class="lineno"> 1516</span>  <span class="keyword">auto</span> it = nameToBindingInfo.find(layerName);</div><div class="line"><a name="l01517"></a><span class="lineno"> 1517</span>  <span class="keywordflow">if</span> (it == nameToBindingInfo.end())</div><div class="line"><a name="l01518"></a><span class="lineno"> 1518</span>  {</div><div class="line"><a name="l01519"></a><span class="lineno"> 1519</span>  nameToBindingInfo[layerName] = std::make_pair(<span class="keywordtype">id</span>, tensorInfo);</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">else</span></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.xhtml">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">"Id %1% used by more than one %2% layer %3%"</span>) %</div><div class="line"><a name="l01527"></a><span class="lineno"> 1527</span>  <span class="keywordtype">id</span> %</div><div class="line"><a name="l01528"></a><span class="lineno"> 1528</span>  bindingPointDesc %</div><div class="line"><a name="l01529"></a><span class="lineno"> 1529</span>  <a class="code" href="_exceptions_8hpp.xhtml#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="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> |
| 1674 | <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> |
| 1675 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_afcc1c3a20bd2860e0ddd21674389246f"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">armnn::IConnectableLayer::GetName</a></div><div class="ttdeci">virtual const char * GetName() const =0</div><div class="ttdoc">Returns the name of the layer. </div></div> |
| 1676 | </div><!-- fragment --> |
| 1677 | </div> |
| 1678 | </div> |
| 1679 | <a id="a2a1112c66d08e3760ecccf39c7854a90"></a> |
| 1680 | <h2 class="memtitle"><span class="permalink"><a href="#a2a1112c66d08e3760ecccf39c7854a90">◆ </a></span>TrackInputBinding()</h2> |
| 1681 | |
| 1682 | <div class="memitem"> |
| 1683 | <div class="memproto"> |
| 1684 | <table class="mlabels"> |
| 1685 | <tr> |
| 1686 | <td class="mlabels-left"> |
| 1687 | <table class="memname"> |
| 1688 | <tr> |
| 1689 | <td class="memname">void TrackInputBinding </td> |
| 1690 | <td>(</td> |
| 1691 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> * </td> |
| 1692 | <td class="paramname"><em>layer</em>, </td> |
| 1693 | </tr> |
| 1694 | <tr> |
| 1695 | <td class="paramkey"></td> |
| 1696 | <td></td> |
| 1697 | <td class="paramtype"><a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> </td> |
| 1698 | <td class="paramname"><em>id</em>, </td> |
| 1699 | </tr> |
| 1700 | <tr> |
| 1701 | <td class="paramkey"></td> |
| 1702 | <td></td> |
| 1703 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> & </td> |
| 1704 | <td class="paramname"><em>tensorInfo</em> </td> |
| 1705 | </tr> |
| 1706 | <tr> |
| 1707 | <td></td> |
| 1708 | <td>)</td> |
| 1709 | <td></td><td></td> |
| 1710 | </tr> |
| 1711 | </table> |
| 1712 | </td> |
| 1713 | <td class="mlabels-right"> |
| 1714 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1715 | </tr> |
| 1716 | </table> |
| 1717 | </div><div class="memdoc"> |
| 1718 | |
| 1719 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01495">1495</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1720 | |
| 1721 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">IConnectableLayer::GetName()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParserBase::m_NetworkInputsBindingInfo</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01509">CaffeParserBase::TrackBindingPoint()</a>.</p> |
| 1722 | |
| 1723 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>.</p> |
| 1724 | <div class="fragment"><div class="line"><a name="l01498"></a><span class="lineno"> 1498</span> {</div><div class="line"><a name="l01499"></a><span class="lineno"> 1499</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5f5e6255b21fdf458d3733bbdcdc4af5">TrackBindingPoint</a>(layer, <span class="keywordtype">id</span>, tensorInfo, layer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">GetName</a>(), <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">m_NetworkInputsBindingInfo</a>);</div><div class="line"><a name="l01500"></a><span class="lineno"> 1500</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_ac62e2558c14e01605f2b4e1e21cdd1e8"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ac62e2558c14e01605f2b4e1e21cdd1e8">armnnCaffeParser::CaffeParserBase::m_NetworkInputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkInputsBindingInfo</div><div class="ttdoc">maps input layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00121">CaffeParser.hpp:121</a></div></div> |
| 1725 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a5f5e6255b21fdf458d3733bbdcdc4af5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5f5e6255b21fdf458d3733bbdcdc4af5">armnnCaffeParser::CaffeParserBase::TrackBindingPoint</a></div><div class="ttdeci">static void TrackBindingPoint(armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo, const char *bindingPointDesc, std::unordered_map< std::string, BindingPointInfo > &nameToBindingInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01509">CaffeParser.cpp:1509</a></div></div> |
| 1726 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_afcc1c3a20bd2860e0ddd21674389246f"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">armnn::IConnectableLayer::GetName</a></div><div class="ttdeci">virtual const char * GetName() const =0</div><div class="ttdoc">Returns the name of the layer. </div></div> |
| 1727 | </div><!-- fragment --> |
| 1728 | </div> |
| 1729 | </div> |
| 1730 | <a id="a0c98e07875a82c71c65bbb53eb347561"></a> |
| 1731 | <h2 class="memtitle"><span class="permalink"><a href="#a0c98e07875a82c71c65bbb53eb347561">◆ </a></span>TrackOutputBinding()</h2> |
| 1732 | |
| 1733 | <div class="memitem"> |
| 1734 | <div class="memproto"> |
| 1735 | <table class="mlabels"> |
| 1736 | <tr> |
| 1737 | <td class="mlabels-left"> |
| 1738 | <table class="memname"> |
| 1739 | <tr> |
| 1740 | <td class="memname">void TrackOutputBinding </td> |
| 1741 | <td>(</td> |
| 1742 | <td class="paramtype"><a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml">armnn::IConnectableLayer</a> * </td> |
| 1743 | <td class="paramname"><em>layer</em>, </td> |
| 1744 | </tr> |
| 1745 | <tr> |
| 1746 | <td class="paramkey"></td> |
| 1747 | <td></td> |
| 1748 | <td class="paramtype"><a class="el" href="namespacearmnn.xhtml#ab8cf8f9fb6792e654c2d8d8382f6f01b">armnn::LayerBindingId</a> </td> |
| 1749 | <td class="paramname"><em>id</em>, </td> |
| 1750 | </tr> |
| 1751 | <tr> |
| 1752 | <td class="paramkey"></td> |
| 1753 | <td></td> |
| 1754 | <td class="paramtype">const <a class="el" href="classarmnn_1_1_tensor_info.xhtml">armnn::TensorInfo</a> & </td> |
| 1755 | <td class="paramname"><em>tensorInfo</em> </td> |
| 1756 | </tr> |
| 1757 | <tr> |
| 1758 | <td></td> |
| 1759 | <td>)</td> |
| 1760 | <td></td><td></td> |
| 1761 | </tr> |
| 1762 | </table> |
| 1763 | </td> |
| 1764 | <td class="mlabels-right"> |
| 1765 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1766 | </tr> |
| 1767 | </table> |
| 1768 | </div><div class="memdoc"> |
| 1769 | |
| 1770 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01502">1502</a> of file <a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a>.</p> |
| 1771 | |
| 1772 | <p class="reference">References <a class="el" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">IConnectableLayer::GetName()</a>, <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParserBase::m_NetworkOutputsBindingInfo</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01509">CaffeParserBase::TrackBindingPoint()</a>.</p> |
| 1773 | |
| 1774 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 1775 | <div class="fragment"><div class="line"><a name="l01505"></a><span class="lineno"> 1505</span> {</div><div class="line"><a name="l01506"></a><span class="lineno"> 1506</span>  <span class="keywordflow">return</span> <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5f5e6255b21fdf458d3733bbdcdc4af5">TrackBindingPoint</a>(layer, <span class="keywordtype">id</span>, tensorInfo, layer-><a class="code" href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">GetName</a>(), <a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">m_NetworkOutputsBindingInfo</a>);</div><div class="line"><a name="l01507"></a><span class="lineno"> 1507</span> }</div><div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a62d6d6cba9ed0d3ad63fffb40aec86b5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a62d6d6cba9ed0d3ad63fffb40aec86b5">armnnCaffeParser::CaffeParserBase::m_NetworkOutputsBindingInfo</a></div><div class="ttdeci">std::unordered_map< std::string, BindingPointInfo > m_NetworkOutputsBindingInfo</div><div class="ttdoc">maps output layer names to their corresponding ids and tensor infos </div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8hpp_source.xhtml#l00124">CaffeParser.hpp:124</a></div></div> |
| 1776 | <div class="ttc" id="classarmnn_caffe_parser_1_1_caffe_parser_base_xhtml_a5f5e6255b21fdf458d3733bbdcdc4af5"><div class="ttname"><a href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5f5e6255b21fdf458d3733bbdcdc4af5">armnnCaffeParser::CaffeParserBase::TrackBindingPoint</a></div><div class="ttdeci">static void TrackBindingPoint(armnn::IConnectableLayer *layer, armnn::LayerBindingId id, const armnn::TensorInfo &tensorInfo, const char *bindingPointDesc, std::unordered_map< std::string, BindingPointInfo > &nameToBindingInfo)</div><div class="ttdef"><b>Definition:</b> <a href="_caffe_parser_8cpp_source.xhtml#l01509">CaffeParser.cpp:1509</a></div></div> |
| 1777 | <div class="ttc" id="classarmnn_1_1_i_connectable_layer_xhtml_afcc1c3a20bd2860e0ddd21674389246f"><div class="ttname"><a href="classarmnn_1_1_i_connectable_layer.xhtml#afcc1c3a20bd2860e0ddd21674389246f">armnn::IConnectableLayer::GetName</a></div><div class="ttdeci">virtual const char * GetName() const =0</div><div class="ttdoc">Returns the name of the layer. </div></div> |
| 1778 | </div><!-- fragment --> |
| 1779 | </div> |
| 1780 | </div> |
| 1781 | <h2 class="groupheader">Member Data Documentation</h2> |
| 1782 | <a id="a9c99d40a72e6f0c6e4ad92d21e44edca"></a> |
| 1783 | <h2 class="memtitle"><span class="permalink"><a href="#a9c99d40a72e6f0c6e4ad92d21e44edca">◆ </a></span>m_ArmnnOutputSlotForCaffeTop</h2> |
| 1784 | |
| 1785 | <div class="memitem"> |
| 1786 | <div class="memproto"> |
| 1787 | <table class="mlabels"> |
| 1788 | <tr> |
| 1789 | <td class="mlabels-left"> |
| 1790 | <table class="memname"> |
| 1791 | <tr> |
| 1792 | <td class="memname">std::unordered_map<std::string, <a class="el" href="classarmnn_1_1_i_output_slot.xhtml">armnn::IOutputSlot</a>*> m_ArmnnOutputSlotForCaffeTop</td> |
| 1793 | </tr> |
| 1794 | </table> |
| 1795 | </td> |
| 1796 | <td class="mlabels-right"> |
| 1797 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1798 | </tr> |
| 1799 | </table> |
| 1800 | </div><div class="memdoc"> |
| 1801 | |
| 1802 | <p>As we add armnn layers we store the armnn IOutputSlot which corresponds to the Caffe tops. </p> |
| 1803 | |
| 1804 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00131">131</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1805 | |
| 1806 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParserBase::Cleanup()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01533">CaffeParserBase::GetArmnnOutputSlotForCaffeTop()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01551">CaffeParserBase::SetArmnnOutputSlotForCaffeTop()</a>.</p> |
| 1807 | |
| 1808 | </div> |
| 1809 | </div> |
| 1810 | <a id="a1424f1bfbfc81d317b51053bbb315ef1"></a> |
| 1811 | <h2 class="memtitle"><span class="permalink"><a href="#a1424f1bfbfc81d317b51053bbb315ef1">◆ </a></span>m_CaffeLayersByTopName</h2> |
| 1812 | |
| 1813 | <div class="memitem"> |
| 1814 | <div class="memproto"> |
| 1815 | <table class="mlabels"> |
| 1816 | <tr> |
| 1817 | <td class="mlabels-left"> |
| 1818 | <table class="memname"> |
| 1819 | <tr> |
| 1820 | <td class="memname">std::map<std::string, const caffe::LayerParameter*> m_CaffeLayersByTopName</td> |
| 1821 | </tr> |
| 1822 | </table> |
| 1823 | </td> |
| 1824 | <td class="mlabels-right"> |
| 1825 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1826 | </tr> |
| 1827 | </table> |
| 1828 | </div><div class="memdoc"> |
| 1829 | |
| 1830 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00139">139</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1831 | |
| 1832 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParserBase::Cleanup()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00339">CaffeParserBase::GetInputs()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 1833 | |
| 1834 | </div> |
| 1835 | </div> |
| 1836 | <a id="a76ea67f3f7d1d5835c5a92b65dc0854c"></a> |
| 1837 | <h2 class="memtitle"><span class="permalink"><a href="#a76ea67f3f7d1d5835c5a92b65dc0854c">◆ </a></span>m_InputShapes</h2> |
| 1838 | |
| 1839 | <div class="memitem"> |
| 1840 | <div class="memproto"> |
| 1841 | <table class="mlabels"> |
| 1842 | <tr> |
| 1843 | <td class="mlabels-left"> |
| 1844 | <table class="memname"> |
| 1845 | <tr> |
| 1846 | <td class="memname">std::map<std::string, <a class="el" href="classarmnn_1_1_tensor_shape.xhtml">armnn::TensorShape</a>> m_InputShapes</td> |
| 1847 | </tr> |
| 1848 | </table> |
| 1849 | </td> |
| 1850 | <td class="mlabels-right"> |
| 1851 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1852 | </tr> |
| 1853 | </table> |
| 1854 | </div><div class="memdoc"> |
| 1855 | |
| 1856 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00128">128</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1857 | |
| 1858 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParserBase::Cleanup()</a>, <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>.</p> |
| 1859 | |
| 1860 | </div> |
| 1861 | </div> |
| 1862 | <a id="a2db3ae8d422f17d455e0ba0cb6291d2a"></a> |
| 1863 | <h2 class="memtitle"><span class="permalink"><a href="#a2db3ae8d422f17d455e0ba0cb6291d2a">◆ </a></span>m_Network</h2> |
| 1864 | |
| 1865 | <div class="memitem"> |
| 1866 | <div class="memproto"> |
| 1867 | <table class="mlabels"> |
| 1868 | <tr> |
| 1869 | <td class="mlabels-left"> |
| 1870 | <table class="memname"> |
| 1871 | <tr> |
| 1872 | <td class="memname"><a class="el" href="namespacearmnn.xhtml#ace74f6f9feb95a964a49d79458232703">armnn::INetworkPtr</a> m_Network</td> |
| 1873 | </tr> |
| 1874 | </table> |
| 1875 | </td> |
| 1876 | <td class="mlabels-right"> |
| 1877 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1878 | </tr> |
| 1879 | </table> |
| 1880 | </div><div class="memdoc"> |
| 1881 | |
| 1882 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00126">126</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1883 | |
| 1884 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00611">CaffeParserBase::AddConvLayerWithDepthwiseConv()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00419">CaffeParserBase::AddConvLayerWithSplits()</a>, <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01338">CaffeParserBase::ParseBatchNormLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01277">CaffeParserBase::ParseConcatLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00701">CaffeParserBase::ParseConvLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01230">CaffeParserBase::ParseEltwiseLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01134">CaffeParserBase::ParseInnerProductLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01027">CaffeParserBase::ParseLRNLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00883">CaffeParserBase::ParsePoolingLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01001">CaffeParserBase::ParseReluLayer()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01404">CaffeParserBase::ParseScaleLayer()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01208">CaffeParserBase::ParseSoftmaxLayer()</a>.</p> |
| 1885 | |
| 1886 | </div> |
| 1887 | </div> |
| 1888 | <a id="ac62e2558c14e01605f2b4e1e21cdd1e8"></a> |
| 1889 | <h2 class="memtitle"><span class="permalink"><a href="#ac62e2558c14e01605f2b4e1e21cdd1e8">◆ </a></span>m_NetworkInputsBindingInfo</h2> |
| 1890 | |
| 1891 | <div class="memitem"> |
| 1892 | <div class="memproto"> |
| 1893 | <table class="mlabels"> |
| 1894 | <tr> |
| 1895 | <td class="mlabels-left"> |
| 1896 | <table class="memname"> |
| 1897 | <tr> |
| 1898 | <td class="memname">std::unordered_map<std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a>> m_NetworkInputsBindingInfo</td> |
| 1899 | </tr> |
| 1900 | </table> |
| 1901 | </td> |
| 1902 | <td class="mlabels-right"> |
| 1903 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1904 | </tr> |
| 1905 | </table> |
| 1906 | </div><div class="memdoc"> |
| 1907 | |
| 1908 | <p>maps input layer names to their corresponding ids and tensor infos </p> |
| 1909 | |
| 1910 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00121">121</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1911 | |
| 1912 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00286">CaffeParserBase::GetNetworkInputBindingInfo()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00364">CaffeParserBase::ParseInputLayer()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01495">CaffeParserBase::TrackInputBinding()</a>.</p> |
| 1913 | |
| 1914 | </div> |
| 1915 | </div> |
| 1916 | <a id="a62d6d6cba9ed0d3ad63fffb40aec86b5"></a> |
| 1917 | <h2 class="memtitle"><span class="permalink"><a href="#a62d6d6cba9ed0d3ad63fffb40aec86b5">◆ </a></span>m_NetworkOutputsBindingInfo</h2> |
| 1918 | |
| 1919 | <div class="memitem"> |
| 1920 | <div class="memproto"> |
| 1921 | <table class="mlabels"> |
| 1922 | <tr> |
| 1923 | <td class="mlabels-left"> |
| 1924 | <table class="memname"> |
| 1925 | <tr> |
| 1926 | <td class="memname">std::unordered_map<std::string, <a class="el" href="namespacearmnn.xhtml#a280670a263dc4fd40491f6d0a2737f44">BindingPointInfo</a>> m_NetworkOutputsBindingInfo</td> |
| 1927 | </tr> |
| 1928 | </table> |
| 1929 | </td> |
| 1930 | <td class="mlabels-right"> |
| 1931 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1932 | </tr> |
| 1933 | </table> |
| 1934 | </div><div class="memdoc"> |
| 1935 | |
| 1936 | <p>maps output layer names to their corresponding ids and tensor infos </p> |
| 1937 | |
| 1938 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00124">124</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1939 | |
| 1940 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l00291">CaffeParserBase::GetNetworkOutputBindingInfo()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01502">CaffeParserBase::TrackOutputBinding()</a>.</p> |
| 1941 | |
| 1942 | </div> |
| 1943 | </div> |
| 1944 | <a id="a86cb41745deebd9b0ccf157d97d4d9ca"></a> |
| 1945 | <h2 class="memtitle"><span class="permalink"><a href="#a86cb41745deebd9b0ccf157d97d4d9ca">◆ </a></span>m_RequestedOutputs</h2> |
| 1946 | |
| 1947 | <div class="memitem"> |
| 1948 | <div class="memproto"> |
| 1949 | <table class="mlabels"> |
| 1950 | <tr> |
| 1951 | <td class="mlabels-left"> |
| 1952 | <table class="memname"> |
| 1953 | <tr> |
| 1954 | <td class="memname">std::vector<std::string> m_RequestedOutputs</td> |
| 1955 | </tr> |
| 1956 | </table> |
| 1957 | </td> |
| 1958 | <td class="mlabels-right"> |
| 1959 | <span class="mlabels"><span class="mlabel">protected</span></span> </td> |
| 1960 | </tr> |
| 1961 | </table> |
| 1962 | </div><div class="memdoc"> |
| 1963 | |
| 1964 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00133">133</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1965 | |
| 1966 | <p class="reference">Referenced by <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01860">CaffeParserBase::Cleanup()</a>, <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01829">CaffeParserBase::CreateNetworkFromNetParameter()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 1967 | |
| 1968 | </div> |
| 1969 | </div> |
| 1970 | <a id="a25a42793445e13200fae0040d7c7d993"></a> |
| 1971 | <h2 class="memtitle"><span class="permalink"><a href="#a25a42793445e13200fae0040d7c7d993">◆ </a></span>ms_CaffeLayerNameToParsingFunctions</h2> |
| 1972 | |
| 1973 | <div class="memitem"> |
| 1974 | <div class="memproto"> |
| 1975 | <table class="mlabels"> |
| 1976 | <tr> |
| 1977 | <td class="mlabels-left"> |
| 1978 | <table class="memname"> |
| 1979 | <tr> |
| 1980 | <td class="memname">const std::map< std::string, <a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a92e74211c7da4501270bc01a6acef64c">CaffeParserBase::OperationParsingFunction</a> > ms_CaffeLayerNameToParsingFunctions</td> |
| 1981 | </tr> |
| 1982 | </table> |
| 1983 | </td> |
| 1984 | <td class="mlabels-right"> |
| 1985 | <span class="mlabels"><span class="mlabel">static</span><span class="mlabel">protected</span></span> </td> |
| 1986 | </tr> |
| 1987 | </table> |
| 1988 | </div><div class="memdoc"> |
| 1989 | <b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line"> { <span class="stringliteral">"Input"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a3a2636dd8414f2bb62c5fa097bdc9791">CaffeParserBase::ParseInputLayer</a> },</div><div class="line"> { <span class="stringliteral">"Convolution"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a5cddc80538d5de7d36192e0fd2d09c63">CaffeParserBase::ParseConvLayer</a> },</div><div class="line"> { <span class="stringliteral">"Pooling"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#ab3329e4bcd8e42cd314f84c8260b06ad">CaffeParserBase::ParsePoolingLayer</a> },</div><div class="line"> { <span class="stringliteral">"ReLU"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a8449e66d395c0525561e3c67b100bafe">CaffeParserBase::ParseReluLayer</a> },</div><div class="line"> { <span class="stringliteral">"LRN"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a7785119cfebd2b02ba3be888965e52ba">CaffeParserBase::ParseLRNLayer</a> },</div><div class="line"> { <span class="stringliteral">"InnerProduct"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a34f6df4b84de1e269bcf02efeecc3892">CaffeParserBase::ParseInnerProductLayer</a> },</div><div class="line"> { <span class="stringliteral">"Softmax"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a1c0594bf03dfbb44029465d3466127b3">CaffeParserBase::ParseSoftmaxLayer</a> },</div><div class="line"> { <span class="stringliteral">"Eltwise"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a99a846a21b3a6ec97cc1d4344b91df36">CaffeParserBase::ParseEltwiseLayer</a> },</div><div class="line"> { <span class="stringliteral">"Concat"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aa0f0ff1cae05c1a0d7cc11b498714312">CaffeParserBase::ParseConcatLayer</a> },</div><div class="line"> { <span class="stringliteral">"BatchNorm"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a940483591995bb812cfcd1595dba83c3">CaffeParserBase::ParseBatchNormLayer</a> },</div><div class="line"> { <span class="stringliteral">"Scale"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a95799625a4aae0ed73838cbfa3530c1b">CaffeParserBase::ParseScaleLayer</a> },</div><div class="line"> { <span class="stringliteral">"Split"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#a3311e9dc3436fe83ef22c5f530fd3234">CaffeParserBase::ParseSplitLayer</a> },</div><div class="line"> { <span class="stringliteral">"Dropout"</span>, &<a class="code" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml#aa4c22681675806fa2c5fbf403d49c628">CaffeParserBase::ParseDropoutLayer</a>},</div><div class="line">}</div></div><!-- fragment --> |
| 1990 | <p>Maps Caffe layer names to parsing member functions. </p> |
| 1991 | |
| 1992 | <p class="definition">Definition at line <a class="el" href="_caffe_parser_8hpp_source.xhtml#l00118">118</a> of file <a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a>.</p> |
| 1993 | |
| 1994 | <p class="reference">Referenced by <a class="el" href="_record_by_record_caffe_parser_8cpp_source.xhtml#l00464">RecordByRecordCaffeParser::CreateNetworkFromBinaryFile()</a>, and <a class="el" href="_caffe_parser_8cpp_source.xhtml#l01632">CaffeParserBase::LoadNetParam()</a>.</p> |
| 1995 | |
| 1996 | </div> |
| 1997 | </div> |
| 1998 | <hr/>The documentation for this class was generated from the following files:<ul> |
| 1999 | <li>src/armnnCaffeParser/<a class="el" href="_caffe_parser_8hpp_source.xhtml">CaffeParser.hpp</a></li> |
| 2000 | <li>src/armnnCaffeParser/<a class="el" href="_caffe_parser_8cpp_source.xhtml">CaffeParser.cpp</a></li> |
| 2001 | </ul> |
| 2002 | </div><!-- contents --> |
| 2003 | </div><!-- doc-content --> |
| 2004 | <!-- start footer part --> |
| 2005 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 2006 | <ul> |
| 2007 | <li class="navelem"><a class="el" href="namespacearmnn_caffe_parser.xhtml">armnnCaffeParser</a></li><li class="navelem"><a class="el" href="classarmnn_caffe_parser_1_1_caffe_parser_base.xhtml">CaffeParserBase</a></li> |
| 2008 | <li class="footer">Generated on Fri Mar 13 2020 16:09:21 for ArmNN by |
| 2009 | <a href="http://www.doxygen.org/index.html"> |
| 2010 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 2011 | </ul> |
| 2012 | </div> |
| 2013 | </body> |
| 2014 | </html> |