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: ConvertFp32NetworkToFp16Impl 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_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.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-methods">Protected Member Functions</a> | |
| 100 | <a href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl-members.xhtml">List of all members</a> </div> |
| 101 | <div class="headertitle"> |
| 102 | <div class="title">ConvertFp32NetworkToFp16Impl Class Reference</div> </div> |
| 103 | </div><!--header--> |
| 104 | <div class="contents"> |
| 105 | |
| 106 | <p><code>#include <<a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml">ConvertFp32NetworkToFp16.hpp</a>></code></p> |
| 107 | <table class="memberdecls"> |
| 108 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a> |
| 109 | Public Member Functions</h2></td></tr> |
| 110 | <tr class="memitem:aaa2a4663cec52a8aa89a93c7c8317183"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml#aaa2a4663cec52a8aa89a93c7c8317183">Run</a> (<a class="el" href="classarmnn_1_1_graph.xhtml">Graph</a> &graph, <a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> &layer) const</td></tr> |
| 111 | <tr class="separator:aaa2a4663cec52a8aa89a93c7c8317183"><td class="memSeparator" colspan="2"> </td></tr> |
| 112 | </table><table class="memberdecls"> |
| 113 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a> |
| 114 | Protected Member Functions</h2></td></tr> |
| 115 | <tr class="memitem:a8c54552a0f174237e8c7edeb7daf2684"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml#a8c54552a0f174237e8c7edeb7daf2684">ConvertFp32NetworkToFp16Impl</a> ()=default</td></tr> |
| 116 | <tr class="separator:a8c54552a0f174237e8c7edeb7daf2684"><td class="memSeparator" colspan="2"> </td></tr> |
| 117 | <tr class="memitem:a2b3e400ddbdb7b3f846b47bb535dfd97"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml#a2b3e400ddbdb7b3f846b47bb535dfd97">~ConvertFp32NetworkToFp16Impl</a> ()=default</td></tr> |
| 118 | <tr class="separator:a2b3e400ddbdb7b3f846b47bb535dfd97"><td class="memSeparator" colspan="2"> </td></tr> |
| 119 | </table> |
| 120 | <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> |
| 121 | <div class="textblock"> |
| 122 | <p class="definition">Definition at line <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml#l00015">15</a> of file <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml">ConvertFp32NetworkToFp16.hpp</a>.</p> |
| 123 | </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> |
| 124 | <a id="a8c54552a0f174237e8c7edeb7daf2684"></a> |
| 125 | <h2 class="memtitle"><span class="permalink"><a href="#a8c54552a0f174237e8c7edeb7daf2684">◆ </a></span>ConvertFp32NetworkToFp16Impl()</h2> |
| 126 | |
| 127 | <div class="memitem"> |
| 128 | <div class="memproto"> |
| 129 | <table class="mlabels"> |
| 130 | <tr> |
| 131 | <td class="mlabels-left"> |
| 132 | <table class="memname"> |
| 133 | <tr> |
| 134 | <td class="memname"><a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml">ConvertFp32NetworkToFp16Impl</a> </td> |
| 135 | <td>(</td> |
| 136 | <td class="paramname"></td><td>)</td> |
| 137 | <td></td> |
| 138 | </tr> |
| 139 | </table> |
| 140 | </td> |
| 141 | <td class="mlabels-right"> |
| 142 | <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">default</span></span> </td> |
| 143 | </tr> |
| 144 | </table> |
| 145 | </div><div class="memdoc"> |
| 146 | |
| 147 | <p class="reference">Referenced by <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml#l00018">ConvertFp32NetworkToFp16Impl::Run()</a>.</p> |
| 148 | |
| 149 | </div> |
| 150 | </div> |
| 151 | <a id="a2b3e400ddbdb7b3f846b47bb535dfd97"></a> |
| 152 | <h2 class="memtitle"><span class="permalink"><a href="#a2b3e400ddbdb7b3f846b47bb535dfd97">◆ </a></span>~ConvertFp32NetworkToFp16Impl()</h2> |
| 153 | |
| 154 | <div class="memitem"> |
| 155 | <div class="memproto"> |
| 156 | <table class="mlabels"> |
| 157 | <tr> |
| 158 | <td class="mlabels-left"> |
| 159 | <table class="memname"> |
| 160 | <tr> |
| 161 | <td class="memname">~<a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml">ConvertFp32NetworkToFp16Impl</a> </td> |
| 162 | <td>(</td> |
| 163 | <td class="paramname"></td><td>)</td> |
| 164 | <td></td> |
| 165 | </tr> |
| 166 | </table> |
| 167 | </td> |
| 168 | <td class="mlabels-right"> |
| 169 | <span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">default</span></span> </td> |
| 170 | </tr> |
| 171 | </table> |
| 172 | </div><div class="memdoc"> |
| 173 | |
| 174 | <p class="reference">Referenced by <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml#l00018">ConvertFp32NetworkToFp16Impl::Run()</a>.</p> |
| 175 | |
| 176 | </div> |
| 177 | </div> |
| 178 | <h2 class="groupheader">Member Function Documentation</h2> |
| 179 | <a id="aaa2a4663cec52a8aa89a93c7c8317183"></a> |
| 180 | <h2 class="memtitle"><span class="permalink"><a href="#aaa2a4663cec52a8aa89a93c7c8317183">◆ </a></span>Run()</h2> |
| 181 | |
| 182 | <div class="memitem"> |
| 183 | <div class="memproto"> |
| 184 | <table class="mlabels"> |
| 185 | <tr> |
| 186 | <td class="mlabels-left"> |
| 187 | <table class="memname"> |
| 188 | <tr> |
| 189 | <td class="memname">void Run </td> |
| 190 | <td>(</td> |
| 191 | <td class="paramtype"><a class="el" href="classarmnn_1_1_graph.xhtml">Graph</a> & </td> |
| 192 | <td class="paramname"><em>graph</em>, </td> |
| 193 | </tr> |
| 194 | <tr> |
| 195 | <td class="paramkey"></td> |
| 196 | <td></td> |
| 197 | <td class="paramtype"><a class="el" href="classarmnn_1_1_layer.xhtml">Layer</a> & </td> |
| 198 | <td class="paramname"><em>layer</em> </td> |
| 199 | </tr> |
| 200 | <tr> |
| 201 | <td></td> |
| 202 | <td>)</td> |
| 203 | <td></td><td> const</td> |
| 204 | </tr> |
| 205 | </table> |
| 206 | </td> |
| 207 | <td class="mlabels-right"> |
| 208 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 209 | </tr> |
| 210 | </table> |
| 211 | </div><div class="memdoc"> |
| 212 | |
| 213 | <p class="definition">Definition at line <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml#l00018">18</a> of file <a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml">ConvertFp32NetworkToFp16.hpp</a>.</p> |
| 214 | |
| 215 | <p class="reference">References <a class="el" href="_layer_8hpp_source.xhtml#l00235">Layer::BeginInputSlots()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00239">Layer::BeginOutputSlots()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a912a4b4d73726c282e3f79aa2c390d6c">armnn::ConvertFp16ToFp32</a>, <a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml#a8c54552a0f174237e8c7edeb7daf2684">ConvertFp32NetworkToFp16Impl::ConvertFp32NetworkToFp16Impl()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4addf4f83b056acd5549949fc0350e9aad">armnn::ConvertFp32ToFp16</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00236">Layer::EndInputSlots()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00240">Layer::EndOutputSlots()</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::Float16</a>, <a class="el" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::Float32</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00095">TensorInfo::GetDataType()</a>, <a class="el" href="_layer_8cpp_source.xhtml#l00273">Layer::GetDataType()</a>, <a class="el" href="_layer_8hpp_source.xhtml#l00259">Layer::GetType()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::Input</a>, <a class="el" href="_network_utils_8cpp_source.xhtml#l00040">armnn::InsertConvertFp16ToFp32LayersBefore()</a>, <a class="el" href="_network_utils_8cpp_source.xhtml#l00079">armnn::InsertConvertFp32ToFp16LayersAfter()</a>, <a class="el" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a29c2c02a361c9d7028472e5d92cd4a54">armnn::Output</a>, <a class="el" href="_tensor_8hpp_source.xhtml#l00096">TensorInfo::SetDataType()</a>, and <a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml#a2b3e400ddbdb7b3f846b47bb535dfd97">ConvertFp32NetworkToFp16Impl::~ConvertFp32NetworkToFp16Impl()</a>.</p> |
| 216 | <div class="fragment"><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>  {</div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>  <span class="keywordflow">if</span>(layer.GetType() == <a class="code" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">LayerType::Input</a>)</div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  {</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>  <span class="comment">// if the outputs of this layer are DataType::Float32</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>  <span class="comment">// add a ConvertFloat32ToFloat16 layer after each of the outputs</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  <span class="keywordflow">if</span> (layer.GetDataType() == <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>)</div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>  {</div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>  <a class="code" href="namespacearmnn.xhtml#abf625e50a5eaeafce5b39580dc95a9d3">InsertConvertFp32ToFp16LayersAfter</a>(graph, layer);</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>  }</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>  }</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (layer.GetType() == <a class="code" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a29c2c02a361c9d7028472e5d92cd4a54">LayerType::Output</a>)</div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  {</div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>  <span class="comment">// if the inputs of this layer are DataType::Float32</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>  <span class="comment">// add a ConvertFloat16ToFloat32 layer before each of the inputs</span></div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  <span class="keywordflow">if</span> (layer.GetDataType() == <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>)</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>  {</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>  <span class="comment">// NOTE: We need to call InsertConvertFp16ToFp32LayersBefore with expectCorrectInputType = false</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="comment">// here, otherwise it will expect the inputs to be DataType::Float16</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <a class="code" href="namespacearmnn.xhtml#ad31c56533e4f9f9f51719599fbfcf7bb">InsertConvertFp16ToFp32LayersBefore</a>(graph, layer, <span class="keyword">false</span>);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  }</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span>  }</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span>  <span class="keywordflow">else</span> <span class="keywordflow">if</span> (layer.GetType() != <a class="code" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4addf4f83b056acd5549949fc0350e9aad">LayerType::ConvertFp32ToFp16</a> && layer.GetType() != <a class="code" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a912a4b4d73726c282e3f79aa2c390d6c">LayerType::ConvertFp16ToFp32</a>)</div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span>  {</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span>  <span class="comment">// if the inputs/outputs of this layer are DataType::Float32</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span>  <span class="comment">// change the data type for all inputs and outputs to DataType::Float16</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& input = layer.BeginInputSlots(); input != layer.EndInputSlots(); ++input)</div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span>  {</div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span>  <span class="comment">// if it is connected to OutputSlot of the InputLayer do not change the DataType of connection</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">// InputSlots of the current layer will be updated when conversion layer is inserted after InputLayer</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  Layer& base = input->GetConnectedOutputSlot()->GetOwningLayer();</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="keywordflow">if</span> (base.GetType() != <a class="code" href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">LayerType::Input</a>)</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  TensorInfo convertInfo = input->GetConnection()->GetTensorInfo();</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keywordflow">if</span> (convertInfo.GetDataType() == <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>)</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  {</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  convertInfo.SetDataType(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">DataType::Float16</a>);</div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  input->GetConnection()->SetTensorInfo(convertInfo);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  }</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  }</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  }</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="comment">// change outputs to DataType::Float16</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <span class="keywordflow">for</span> (<span class="keyword">auto</span>&& output = layer.BeginOutputSlots(); output != layer.EndOutputSlots(); ++output)</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  {</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  TensorInfo convertInfo = output->GetTensorInfo();</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>  <span class="keywordflow">if</span> (convertInfo.GetDataType() == <a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">DataType::Float32</a>)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  {</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  convertInfo.SetDataType(<a class="code" href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">DataType::Float16</a>);</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  output->SetTensorInfo(convertInfo);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  }</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  }</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  }</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>  }</div><div class="ttc" id="namespacearmnn_xhtml_abf625e50a5eaeafce5b39580dc95a9d3"><div class="ttname"><a href="namespacearmnn.xhtml#abf625e50a5eaeafce5b39580dc95a9d3">armnn::InsertConvertFp32ToFp16LayersAfter</a></div><div class="ttdeci">std::vector< ConvertFp32ToFp16Layer * > InsertConvertFp32ToFp16LayersAfter(Graph &graph, Layer &layer)</div><div class="ttdef"><b>Definition:</b> <a href="_network_utils_8cpp_source.xhtml#l00079">NetworkUtils.cpp:79</a></div></div> |
| 217 | <div class="ttc" id="namespacearmnn_xhtml_ad31c56533e4f9f9f51719599fbfcf7bb"><div class="ttname"><a href="namespacearmnn.xhtml#ad31c56533e4f9f9f51719599fbfcf7bb">armnn::InsertConvertFp16ToFp32LayersBefore</a></div><div class="ttdeci">std::vector< ConvertFp16ToFp32Layer * > InsertConvertFp16ToFp32LayersBefore(Graph &graph, Layer &layer, bool expectCorrectInputType)</div><div class="ttdef"><b>Definition:</b> <a href="_network_utils_8cpp_source.xhtml#l00040">NetworkUtils.cpp:40</a></div></div> |
| 218 | <div class="ttc" id="namespacearmnn_xhtml_a56943a0946e5f15e5e58054b8e7a04a4a29c2c02a361c9d7028472e5d92cd4a54"><div class="ttname"><a href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a29c2c02a361c9d7028472e5d92cd4a54">armnn::LayerType::Output</a></div></div> |
| 219 | <div class="ttc" id="namespacearmnn_xhtml_a56943a0946e5f15e5e58054b8e7a04a4addf4f83b056acd5549949fc0350e9aad"><div class="ttname"><a href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4addf4f83b056acd5549949fc0350e9aad">armnn::LayerType::ConvertFp32ToFp16</a></div></div> |
| 220 | <div class="ttc" id="namespacearmnn_xhtml_a56943a0946e5f15e5e58054b8e7a04a4a912a4b4d73726c282e3f79aa2c390d6c"><div class="ttname"><a href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a912a4b4d73726c282e3f79aa2c390d6c">armnn::LayerType::ConvertFp16ToFp32</a></div></div> |
| 221 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a26e6ed77470c6f2f830ecf874e6c0d55">armnn::DataType::Float16</a></div></div> |
| 222 | <div class="ttc" id="namespacearmnn_xhtml_a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5"><div class="ttname"><a href="namespacearmnn.xhtml#a56943a0946e5f15e5e58054b8e7a04a4a324118a6721dd6b8a9b9f4e327df2bf5">armnn::LayerType::Input</a></div></div> |
| 223 | <div class="ttc" id="namespacearmnn_xhtml_ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204"><div class="ttname"><a href="namespacearmnn.xhtml#ad8ed01ff3ff33333d8e19db4d2818bb6a166495adc0d0f53bee6baecc577f5204">armnn::DataType::Float32</a></div></div> |
| 224 | </div><!-- fragment --> |
| 225 | </div> |
| 226 | </div> |
| 227 | <hr/>The documentation for this class was generated from the following file:<ul> |
| 228 | <li>src/armnn/optimizations/<a class="el" href="_convert_fp32_network_to_fp16_8hpp_source.xhtml">ConvertFp32NetworkToFp16.hpp</a></li> |
| 229 | </ul> |
| 230 | </div><!-- contents --> |
| 231 | </div><!-- doc-content --> |
| 232 | <!-- start footer part --> |
| 233 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 234 | <ul> |
| 235 | <li class="navelem"><a class="el" href="namespacearmnn.xhtml">armnn</a></li><li class="navelem"><a class="el" href="namespacearmnn_1_1optimizations.xhtml">optimizations</a></li><li class="navelem"><a class="el" href="classarmnn_1_1optimizations_1_1_convert_fp32_network_to_fp16_impl.xhtml">ConvertFp32NetworkToFp16Impl</a></li> |
| 236 | <li class="footer">Generated on Fri Mar 13 2020 16:09:20 for ArmNN by |
| 237 | <a href="http://www.doxygen.org/index.html"> |
| 238 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> |
| 239 | </ul> |
| 240 | </div> |
| 241 | </body> |
| 242 | </html> |