170 lines
68 KiB
HTML
170 lines
68 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<title>mlpack: src/mlpack/methods/ann/layer/recurrent_attention.hpp Source File</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
$(document).ready(function() { init_search(); });
|
|
</script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="extra-stylesheet.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">mlpack
|
|
 <span id="projectnumber">master</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<script type="text/javascript">
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="pages.html"><span>Related Pages</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_44a936ef30fc126706c6284a2fc0c990.html">mlpack</a></li><li class="navelem"><a class="el" href="dir_3cfbf900288ec2fe8dd2c2c8482f216e.html">methods</a></li><li class="navelem"><a class="el" href="dir_04cdefcc9a97fb221ee3f2d7fb8aab76.html">ann</a></li><li class="navelem"><a class="el" href="dir_104798ce316d01262d69b00f4c94ed15.html">layer</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">recurrent_attention.hpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="recurrent__attention_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#ifndef MLPACK_METHODS_ANN_LAYER_RECURRENT_ATTENTION_HPP</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="preprocessor">#define MLPACK_METHODS_ANN_LAYER_RECURRENT_ATTENTION_HPP</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="preprocessor">#include <<a class="code" href="prereqs_8hpp.html">mlpack/prereqs.hpp</a>></span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="preprocessor">#include <boost/ptr_container/ptr_vector.hpp></span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="preprocessor">#include "../visitor/delta_visitor.hpp"</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="preprocessor">#include "../visitor/output_parameter_visitor.hpp"</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="preprocessor">#include "../visitor/reset_visitor.hpp"</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="preprocessor">#include "../visitor/weight_size_visitor.hpp"</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="preprocessor">#include "<a class="code" href="layer__types_8hpp.html">layer_types.hpp</a>"</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="preprocessor">#include "<a class="code" href="add__merge_8hpp.html">add_merge.hpp</a>"</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="preprocessor">#include "<a class="code" href="sequential_8hpp.html">sequential.hpp</a>"</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="keyword">namespace </span><a class="code" href="namespacemlpack.html">mlpack</a> {</div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> <span class="keyword">namespace </span>ann {</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="keyword">template</span> <</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  <span class="keyword">typename</span> InputDataType = arma::mat,</div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  <span class="keyword">typename</span> OutputDataType = arma::mat</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> ></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> <span class="keyword">class </span>RecurrentAttention</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>  <span class="keyword">public</span>:</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="keyword">template</span><<span class="keyword">typename</span> RNNModuleType, <span class="keyword">typename</span> ActionModuleType></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a19f682d512f398ca875a91dba8ed8692">RecurrentAttention</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad17b0815047347a9df76e2787d5dafa2">outSize</a>,</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="keyword">const</span> RNNModuleType& rnn,</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keyword">const</span> ActionModuleType& action,</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <span class="keyword">const</span> <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa14155589771e3e9a78c0493e90c064d">rho</a>);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keyword">template</span><<span class="keyword">typename</span> eT></div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa7a3dfdfe84b6a15776f1c8257b4956a">Forward</a>(arma::Mat<eT>&& input, arma::Mat<eT>&& output);</div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  <span class="keyword">template</span><<span class="keyword">typename</span> eT></div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a0755012425c0a71ce6b4ce6381207650">Backward</a>(<span class="keyword">const</span> arma::Mat<eT>&& <span class="comment">/* input */</span>,</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span>  arma::Mat<eT>&& gy,</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  arma::Mat<eT>&& g);</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> </div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">/*</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> <span class="comment"> * Calculate the gradient using the output delta and the input activation.</span></div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span> <span class="comment"> *</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> <span class="comment"> * @param input The input parameter used for calculating the gradient.</span></div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span> <span class="comment"> * @param error The calculated error.</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> <span class="comment"> * @param gradient The calculated gradient.</span></div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="comment"> */</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">template</span><<span class="keyword">typename</span> eT></div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ae9d06c675ca35bebef0695ea2be9420b">Gradient</a>(arma::Mat<eT>&& <span class="comment">/* input */</span>,</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  arma::Mat<eT>&& <span class="comment">/* error */</span>,</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  arma::Mat<eT>&& <span class="comment">/* gradient */</span>);</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac4148977cfbd072efc7c650ba99113af"> 109</a></span>  std::vector<LayerTypes>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac4148977cfbd072efc7c650ba99113af">Model</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aab4436c184e8d3d9c92836140b6e7b23">network</a>; }</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00112"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac1e14d38436eb66b0a65710848b1b9be"> 112</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac1e14d38436eb66b0a65710848b1b9be">Deterministic</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a77b811d4b1991f8928d8a1f39e911048">deterministic</a>; }</div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5203a680eb6615ecf60ea59db7528c0d"> 114</a></span>  <span class="keywordtype">bool</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5203a680eb6615ecf60ea59db7528c0d">Deterministic</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a77b811d4b1991f8928d8a1f39e911048">deterministic</a>; }</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span> </div><div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aaebc417fc7f43c6648eea3f034e43456"> 117</a></span>  OutputDataType <span class="keyword">const</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aaebc417fc7f43c6648eea3f034e43456">Parameters</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a590df1e786e3189b7e8c671fa7bc881c">parameters</a>; }</div><div class="line"><a name="l00119"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1c3e7cd936a337cbd8fed60450660f92"> 119</a></span>  OutputDataType& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1c3e7cd936a337cbd8fed60450660f92">Parameters</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a590df1e786e3189b7e8c671fa7bc881c">parameters</a>; }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> </div><div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a362e8cfdc65bb93f1c42d151aeb285b1"> 122</a></span>  InputDataType <span class="keyword">const</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a362e8cfdc65bb93f1c42d151aeb285b1">InputParameter</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a85cfb3c933cc1e4dd5c0c71417c59a25">inputParameter</a>; }</div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a090a6ff673e3cb209ca87711dfca899f"> 124</a></span>  InputDataType& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a090a6ff673e3cb209ca87711dfca899f">InputParameter</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a85cfb3c933cc1e4dd5c0c71417c59a25">inputParameter</a>; }</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span> </div><div class="line"><a name="l00127"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#abfb656c46c9ee91aef52653d2d3b03ab"> 127</a></span>  OutputDataType <span class="keyword">const</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#abfb656c46c9ee91aef52653d2d3b03ab">OutputParameter</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a746f720a444112d3505aa2c51605f044">outputParameter</a>; }</div><div class="line"><a name="l00129"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1fdd26eb5c41cae15afddd82a1fa93e7"> 129</a></span>  OutputDataType& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1fdd26eb5c41cae15afddd82a1fa93e7">OutputParameter</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a746f720a444112d3505aa2c51605f044">outputParameter</a>; }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div><div class="line"><a name="l00132"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa6ba8ecdce51104b9448121b047cc682"> 132</a></span>  OutputDataType <span class="keyword">const</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa6ba8ecdce51104b9448121b047cc682">Delta</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1f736747773ee40ca22a971193500cdf">delta</a>; }</div><div class="line"><a name="l00134"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5a0314639c2ebd6e6dc6cab29139ab49"> 134</a></span>  OutputDataType& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5a0314639c2ebd6e6dc6cab29139ab49">Delta</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1f736747773ee40ca22a971193500cdf">delta</a>; }</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ae9d06c675ca35bebef0695ea2be9420b"> 137</a></span>  OutputDataType <span class="keyword">const</span>& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ae9d06c675ca35bebef0695ea2be9420b">Gradient</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a2c0e2e07af58601c50749b1046d80973">gradient</a>; }</div><div class="line"><a name="l00139"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a8ad9522d1ae92f2b12e25af90b8e2adc"> 139</a></span>  OutputDataType& <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a8ad9522d1ae92f2b12e25af90b8e2adc">Gradient</a>() { <span class="keywordflow">return</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a2c0e2e07af58601c50749b1046d80973">gradient</a>; }</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span> </div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keyword">template</span><<span class="keyword">typename</span> Archive></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#accd62dfa0e1fef09b8cbd3f88b6aaa4c">Serialize</a>(Archive& ar, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <span class="comment">/* version */</span>);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>  <span class="keyword">private</span>:</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a39dee24af36a901e09bbbd37d1ae5da4"> 149</a></span>  <span class="keywordtype">void</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a39dee24af36a901e09bbbd37d1ae5da4">IntermediateGradient</a>()</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>  {</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a47f4316b9656db9830d27db4ef7dd79a">intermediateGradient</a>.zeros();</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span> </div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  <span class="comment">// Gradient of the action module.</span></div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="keywordflow">if</span> (<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1b30f13a0fe58eccf60e016d7c91a468">backwardStep</a> == (<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa14155589771e3e9a78c0493e90c064d">rho</a> - 1))</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>  {</div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span>  boost::apply_visitor(<a class="code" href="classmlpack_1_1ann_1_1GradientVisitor.html">GradientVisitor</a>(std::move(<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aae06e82d6c78e58e411138d9158c3e1b">initialInput</a>),</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  std::move(<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab7d7d894a275bed0b00d183320a6be65">actionError</a>)), <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd">actionModule</a>);</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>  {</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>  boost::apply_visitor(<a class="code" href="classmlpack_1_1ann_1_1GradientVisitor.html">GradientVisitor</a>(std::move(boost::apply_visitor(</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a06fe2fba7ec7dbf60cb6de583fceb472">outputParameterVisitor</a>, <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd">actionModule</a>)), std::move(<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab7d7d894a275bed0b00d183320a6be65">actionError</a>)),</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd">actionModule</a>);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> </div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  <span class="comment">// Gradient of the recurrent module.</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>  boost::apply_visitor(<a class="code" href="classmlpack_1_1ann_1_1GradientVisitor.html">GradientVisitor</a>(std::move(boost::apply_visitor(</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a06fe2fba7ec7dbf60cb6de583fceb472">outputParameterVisitor</a>, <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a239209777c3d9d1a582f23abf19f3fc4">rnnModule</a>)), std::move(<a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7b49e1a16716affeca8775b0eebf735f">recurrentError</a>)),</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a239209777c3d9d1a582f23abf19f3fc4">rnnModule</a>);</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span> </div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a24ea3d5f07b29367bca715c42b6c6cf4">attentionGradient</a> += <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a47f4316b9656db9830d27db4ef7dd79a">intermediateGradient</a>;</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>  }</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> </div><div class="line"><a name="l00175"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad17b0815047347a9df76e2787d5dafa2"> 175</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad17b0815047347a9df76e2787d5dafa2">outSize</a>;</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span> </div><div class="line"><a name="l00178"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a239209777c3d9d1a582f23abf19f3fc4"> 178</a></span>  <a class="code" href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">LayerTypes</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a239209777c3d9d1a582f23abf19f3fc4">rnnModule</a>;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span> </div><div class="line"><a name="l00181"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd"> 181</a></span>  <a class="code" href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">LayerTypes</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd">actionModule</a>;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> </div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa14155589771e3e9a78c0493e90c064d"> 184</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa14155589771e3e9a78c0493e90c064d">rho</a>;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span> </div><div class="line"><a name="l00187"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7eaf0aff785c43278adb77e11fc4141f"> 187</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7eaf0aff785c43278adb77e11fc4141f">forwardStep</a>;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span> </div><div class="line"><a name="l00190"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1b30f13a0fe58eccf60e016d7c91a468"> 190</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1b30f13a0fe58eccf60e016d7c91a468">backwardStep</a>;</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a77b811d4b1991f8928d8a1f39e911048"> 193</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a77b811d4b1991f8928d8a1f39e911048">deterministic</a>;</div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> </div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a590df1e786e3189b7e8c671fa7bc881c"> 196</a></span>  OutputDataType <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a590df1e786e3189b7e8c671fa7bc881c">parameters</a>;</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00199"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ade55fa8342c9bcae3ae77014b01606a7"> 199</a></span>  <a class="code" href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">LayerTypes</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ade55fa8342c9bcae3ae77014b01606a7">initialModule</a>;</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span> </div><div class="line"><a name="l00202"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a088da132402dcf93478b20a127b999c3"> 202</a></span>  <a class="code" href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">LayerTypes</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a088da132402dcf93478b20a127b999c3">recurrentModule</a>;</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span> </div><div class="line"><a name="l00205"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aab4436c184e8d3d9c92836140b6e7b23"> 205</a></span>  std::vector<LayerTypes> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aab4436c184e8d3d9c92836140b6e7b23">network</a>;</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span> </div><div class="line"><a name="l00208"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad351382c3727ae0a77e78d6f99f734f5"> 208</a></span>  <a class="code" href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">LayerTypes</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad351382c3727ae0a77e78d6f99f734f5">mergeModule</a>;</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span> </div><div class="line"><a name="l00211"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a33034968bc81db083711bac84dc4a1cf"> 211</a></span>  <a class="code" href="classmlpack_1_1ann_1_1WeightSizeVisitor.html">WeightSizeVisitor</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a33034968bc81db083711bac84dc4a1cf">weightSizeVisitor</a>;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span> </div><div class="line"><a name="l00214"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a96f330bd8a403a509ef32b2866cb03da"> 214</a></span>  <a class="code" href="classmlpack_1_1ann_1_1DeltaVisitor.html">DeltaVisitor</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a96f330bd8a403a509ef32b2866cb03da">deltaVisitor</a>;</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span> </div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a06fe2fba7ec7dbf60cb6de583fceb472"> 217</a></span>  <a class="code" href="classmlpack_1_1ann_1_1OutputParameterVisitor.html">OutputParameterVisitor</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a06fe2fba7ec7dbf60cb6de583fceb472">outputParameterVisitor</a>;</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span> </div><div class="line"><a name="l00220"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7d007c1d41cc9894fcd45075f8815d26"> 220</a></span>  std::vector<arma::mat> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7d007c1d41cc9894fcd45075f8815d26">feedbackOutputParameter</a>;</div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span> </div><div class="line"><a name="l00223"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab4f862c30e171f6653b643d5e6647a85"> 223</a></span>  std::vector<arma::mat> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab4f862c30e171f6653b643d5e6647a85">moduleOutputParameter</a>;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00226"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1f736747773ee40ca22a971193500cdf"> 226</a></span>  OutputDataType <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1f736747773ee40ca22a971193500cdf">delta</a>;</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span> </div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a2c0e2e07af58601c50749b1046d80973"> 229</a></span>  OutputDataType <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a2c0e2e07af58601c50749b1046d80973">gradient</a>;</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span> </div><div class="line"><a name="l00232"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a85cfb3c933cc1e4dd5c0c71417c59a25"> 232</a></span>  InputDataType <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a85cfb3c933cc1e4dd5c0c71417c59a25">inputParameter</a>;</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span> </div><div class="line"><a name="l00235"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a746f720a444112d3505aa2c51605f044"> 235</a></span>  OutputDataType <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a746f720a444112d3505aa2c51605f044">outputParameter</a>;</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span> </div><div class="line"><a name="l00238"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7b49e1a16716affeca8775b0eebf735f"> 238</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7b49e1a16716affeca8775b0eebf735f">recurrentError</a>;</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> </div><div class="line"><a name="l00241"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab7d7d894a275bed0b00d183320a6be65"> 241</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab7d7d894a275bed0b00d183320a6be65">actionError</a>;</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00244"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a71e9916813df3cd97b852b7aca842e8f"> 244</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a71e9916813df3cd97b852b7aca842e8f">actionDelta</a>;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> </div><div class="line"><a name="l00247"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a9f177b1a1cdf09b7205b6c6e154a8a41"> 247</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a9f177b1a1cdf09b7205b6c6e154a8a41">rnnDelta</a>;</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span> </div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aae06e82d6c78e58e411138d9158c3e1b"> 250</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#aae06e82d6c78e58e411138d9158c3e1b">initialInput</a>;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> </div><div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a254ceb823abc1b36daee61038254a5c0"> 253</a></span>  <a class="code" href="classmlpack_1_1ann_1_1ResetVisitor.html">ResetVisitor</a> <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a254ceb823abc1b36daee61038254a5c0">resetVisitor</a>;</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span> </div><div class="line"><a name="l00256"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a24ea3d5f07b29367bca715c42b6c6cf4"> 256</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a24ea3d5f07b29367bca715c42b6c6cf4">attentionGradient</a>;</div><div class="line"><a name="l00257"></a><span class="lineno"> 257</span> </div><div class="line"><a name="l00259"></a><span class="lineno"><a class="line" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a47f4316b9656db9830d27db4ef7dd79a"> 259</a></span>  arma::mat <a class="code" href="classmlpack_1_1ann_1_1RecurrentAttention.html#a47f4316b9656db9830d27db4ef7dd79a">intermediateGradient</a>;</div><div class="line"><a name="l00260"></a><span class="lineno"> 260</span> }; <span class="comment">// class RecurrentAttention</span></div><div class="line"><a name="l00261"></a><span class="lineno"> 261</span> </div><div class="line"><a name="l00262"></a><span class="lineno"> 262</span> } <span class="comment">// namespace ann</span></div><div class="line"><a name="l00263"></a><span class="lineno"> 263</span> } <span class="comment">// namespace mlpack</span></div><div class="line"><a name="l00264"></a><span class="lineno"> 264</span> </div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="comment">// Include implementation.</span></div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> <span class="preprocessor">#include "recurrent_attention_impl.hpp"</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span> </div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a239209777c3d9d1a582f23abf19f3fc4"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a239209777c3d9d1a582f23abf19f3fc4">mlpack::ann::RecurrentAttention::rnnModule</a></div><div class="ttdeci">LayerTypes rnnModule</div><div class="ttdoc">Locally-stored start module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00178">recurrent_attention.hpp:178</a></div></div>
|
|
<div class="ttc" id="add__merge_8hpp_html"><div class="ttname"><a href="add__merge_8hpp.html">add_merge.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a0755012425c0a71ce6b4ce6381207650"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a0755012425c0a71ce6b4ce6381207650">mlpack::ann::RecurrentAttention::Backward</a></div><div class="ttdeci">void Backward(const arma::Mat< eT > &&, arma::Mat< eT > &&gy, arma::Mat< eT > &&g)</div><div class="ttdoc">Ordinary feed backward pass of a neural network, calculating the function f(x) by propagating x backw...</div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a7eaf0aff785c43278adb77e11fc4141f"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7eaf0aff785c43278adb77e11fc4141f">mlpack::ann::RecurrentAttention::forwardStep</a></div><div class="ttdeci">size_t forwardStep</div><div class="ttdoc">Locally-stored number of forward steps. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00187">recurrent_attention.hpp:187</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_accd62dfa0e1fef09b8cbd3f88b6aaa4c"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#accd62dfa0e1fef09b8cbd3f88b6aaa4c">mlpack::ann::RecurrentAttention::Serialize</a></div><div class="ttdeci">void Serialize(Archive &ar, const unsigned int)</div><div class="ttdoc">Serialize the layer. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a24ea3d5f07b29367bca715c42b6c6cf4"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a24ea3d5f07b29367bca715c42b6c6cf4">mlpack::ann::RecurrentAttention::attentionGradient</a></div><div class="ttdeci">arma::mat attentionGradient</div><div class="ttdoc">Locally-stored attention gradient. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00256">recurrent_attention.hpp:256</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a1c3e7cd936a337cbd8fed60450660f92"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1c3e7cd936a337cbd8fed60450660f92">mlpack::ann::RecurrentAttention::Parameters</a></div><div class="ttdeci">OutputDataType & Parameters()</div><div class="ttdoc">Modify the parameters. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00119">recurrent_attention.hpp:119</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a1b30f13a0fe58eccf60e016d7c91a468"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1b30f13a0fe58eccf60e016d7c91a468">mlpack::ann::RecurrentAttention::backwardStep</a></div><div class="ttdeci">size_t backwardStep</div><div class="ttdoc">Locally-stored number of backward steps. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00190">recurrent_attention.hpp:190</a></div></div>
|
|
<div class="ttc" id="namespacemlpack_html"><div class="ttname"><a href="namespacemlpack.html">mlpack</a></div><div class="ttdoc">Linear algebra utility functions, generally performed on matrices or vectors. </div><div class="ttdef"><b>Definition:</b> <a href="binarize_8hpp_source.html#l00018">binarize.hpp:18</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a19f682d512f398ca875a91dba8ed8692"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a19f682d512f398ca875a91dba8ed8692">mlpack::ann::RecurrentAttention::RecurrentAttention</a></div><div class="ttdeci">RecurrentAttention(const size_t outSize, const RNNModuleType &rnn, const ActionModuleType &action, const size_t rho)</div><div class="ttdoc">Create the RecurrentAttention object using the specified modules. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ab6c4e98468d2cf837212416d5961a0cd"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab6c4e98468d2cf837212416d5961a0cd">mlpack::ann::RecurrentAttention::actionModule</a></div><div class="ttdeci">LayerTypes actionModule</div><div class="ttdoc">Locally-stored input module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00181">recurrent_attention.hpp:181</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a088da132402dcf93478b20a127b999c3"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a088da132402dcf93478b20a127b999c3">mlpack::ann::RecurrentAttention::recurrentModule</a></div><div class="ttdeci">LayerTypes recurrentModule</div><div class="ttdoc">Locally-stored recurrent module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00202">recurrent_attention.hpp:202</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ad17b0815047347a9df76e2787d5dafa2"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad17b0815047347a9df76e2787d5dafa2">mlpack::ann::RecurrentAttention::outSize</a></div><div class="ttdeci">size_t outSize</div><div class="ttdoc">Locally-stored module output size. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00175">recurrent_attention.hpp:175</a></div></div>
|
|
<div class="ttc" id="prereqs_8hpp_html"><div class="ttname"><a href="prereqs_8hpp.html">prereqs.hpp</a></div><div class="ttdoc">The core includes that mlpack expects; standard C++ includes and Armadillo. </div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a06fe2fba7ec7dbf60cb6de583fceb472"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a06fe2fba7ec7dbf60cb6de583fceb472">mlpack::ann::RecurrentAttention::outputParameterVisitor</a></div><div class="ttdeci">OutputParameterVisitor outputParameterVisitor</div><div class="ttdoc">Locally-stored output parameter visitor. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00217">recurrent_attention.hpp:217</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ad351382c3727ae0a77e78d6f99f734f5"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ad351382c3727ae0a77e78d6f99f734f5">mlpack::ann::RecurrentAttention::mergeModule</a></div><div class="ttdeci">LayerTypes mergeModule</div><div class="ttdoc">Locally-stored merge module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00208">recurrent_attention.hpp:208</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a7b49e1a16716affeca8775b0eebf735f"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7b49e1a16716affeca8775b0eebf735f">mlpack::ann::RecurrentAttention::recurrentError</a></div><div class="ttdeci">arma::mat recurrentError</div><div class="ttdoc">Locally-stored recurrent error parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00238">recurrent_attention.hpp:238</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1WeightSizeVisitor_html"><div class="ttname"><a href="classmlpack_1_1ann_1_1WeightSizeVisitor.html">mlpack::ann::WeightSizeVisitor</a></div><div class="ttdoc">WeightSizeVisitor returns the number of weights of the given module. </div><div class="ttdef"><b>Definition:</b> <a href="weight__size__visitor_8hpp_source.html#l00028">weight_size_visitor.hpp:28</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ab7d7d894a275bed0b00d183320a6be65"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab7d7d894a275bed0b00d183320a6be65">mlpack::ann::RecurrentAttention::actionError</a></div><div class="ttdeci">arma::mat actionError</div><div class="ttdoc">Locally-stored action error parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00241">recurrent_attention.hpp:241</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a1fdd26eb5c41cae15afddd82a1fa93e7"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1fdd26eb5c41cae15afddd82a1fa93e7">mlpack::ann::RecurrentAttention::OutputParameter</a></div><div class="ttdeci">OutputDataType & OutputParameter()</div><div class="ttdoc">Modify the output parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00129">recurrent_attention.hpp:129</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a1f736747773ee40ca22a971193500cdf"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a1f736747773ee40ca22a971193500cdf">mlpack::ann::RecurrentAttention::delta</a></div><div class="ttdeci">OutputDataType delta</div><div class="ttdoc">Locally-stored delta object. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00226">recurrent_attention.hpp:226</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a96f330bd8a403a509ef32b2866cb03da"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a96f330bd8a403a509ef32b2866cb03da">mlpack::ann::RecurrentAttention::deltaVisitor</a></div><div class="ttdeci">DeltaVisitor deltaVisitor</div><div class="ttdoc">Locally-stored delta visitor. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00214">recurrent_attention.hpp:214</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ab4f862c30e171f6653b643d5e6647a85"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ab4f862c30e171f6653b643d5e6647a85">mlpack::ann::RecurrentAttention::moduleOutputParameter</a></div><div class="ttdeci">std::vector< arma::mat > moduleOutputParameter</div><div class="ttdoc">List of all module parameters for the backward pass (BBTT). </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00223">recurrent_attention.hpp:223</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a590df1e786e3189b7e8c671fa7bc881c"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a590df1e786e3189b7e8c671fa7bc881c">mlpack::ann::RecurrentAttention::parameters</a></div><div class="ttdeci">OutputDataType parameters</div><div class="ttdoc">Locally-stored weight object. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00196">recurrent_attention.hpp:196</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aae06e82d6c78e58e411138d9158c3e1b"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aae06e82d6c78e58e411138d9158c3e1b">mlpack::ann::RecurrentAttention::initialInput</a></div><div class="ttdeci">arma::mat initialInput</div><div class="ttdoc">Locally-stored initial action input. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00250">recurrent_attention.hpp:250</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aa7a3dfdfe84b6a15776f1c8257b4956a"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa7a3dfdfe84b6a15776f1c8257b4956a">mlpack::ann::RecurrentAttention::Forward</a></div><div class="ttdeci">void Forward(arma::Mat< eT > &&input, arma::Mat< eT > &&output)</div><div class="ttdoc">Ordinary feed forward pass of a neural network, evaluating the function f(x) by propagating the activ...</div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aa14155589771e3e9a78c0493e90c064d"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa14155589771e3e9a78c0493e90c064d">mlpack::ann::RecurrentAttention::rho</a></div><div class="ttdeci">size_t rho</div><div class="ttdoc">Number of steps to backpropagate through time (BPTT). </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00184">recurrent_attention.hpp:184</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ae9d06c675ca35bebef0695ea2be9420b"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ae9d06c675ca35bebef0695ea2be9420b">mlpack::ann::RecurrentAttention::Gradient</a></div><div class="ttdeci">OutputDataType const & Gradient() const </div><div class="ttdoc">Get the gradient. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00137">recurrent_attention.hpp:137</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a9f177b1a1cdf09b7205b6c6e154a8a41"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a9f177b1a1cdf09b7205b6c6e154a8a41">mlpack::ann::RecurrentAttention::rnnDelta</a></div><div class="ttdeci">arma::mat rnnDelta</div><div class="ttdoc">Locally-stored recurrent delta. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00247">recurrent_attention.hpp:247</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aa6ba8ecdce51104b9448121b047cc682"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aa6ba8ecdce51104b9448121b047cc682">mlpack::ann::RecurrentAttention::Delta</a></div><div class="ttdeci">OutputDataType const & Delta() const </div><div class="ttdoc">Get the delta. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00132">recurrent_attention.hpp:132</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1ResetVisitor_html"><div class="ttname"><a href="classmlpack_1_1ann_1_1ResetVisitor.html">mlpack::ann::ResetVisitor</a></div><div class="ttdoc">ResetVisitor executes the Reset() function. </div><div class="ttdef"><b>Definition:</b> <a href="reset__visitor_8hpp_source.html#l00027">reset_visitor.hpp:27</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1OutputParameterVisitor_html"><div class="ttname"><a href="classmlpack_1_1ann_1_1OutputParameterVisitor.html">mlpack::ann::OutputParameterVisitor</a></div><div class="ttdoc">OutputParameterVisitor exposes the output parameter of the given module. </div><div class="ttdef"><b>Definition:</b> <a href="output__parameter__visitor_8hpp_source.html#l00027">output_parameter_visitor.hpp:27</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a8ad9522d1ae92f2b12e25af90b8e2adc"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a8ad9522d1ae92f2b12e25af90b8e2adc">mlpack::ann::RecurrentAttention::Gradient</a></div><div class="ttdeci">OutputDataType & Gradient()</div><div class="ttdoc">Modify the gradient. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00139">recurrent_attention.hpp:139</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_abfb656c46c9ee91aef52653d2d3b03ab"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#abfb656c46c9ee91aef52653d2d3b03ab">mlpack::ann::RecurrentAttention::OutputParameter</a></div><div class="ttdeci">OutputDataType const & OutputParameter() const </div><div class="ttdoc">Get the output parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00127">recurrent_attention.hpp:127</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a746f720a444112d3505aa2c51605f044"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a746f720a444112d3505aa2c51605f044">mlpack::ann::RecurrentAttention::outputParameter</a></div><div class="ttdeci">OutputDataType outputParameter</div><div class="ttdoc">Locally-stored output parameter object. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00235">recurrent_attention.hpp:235</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a39dee24af36a901e09bbbd37d1ae5da4"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a39dee24af36a901e09bbbd37d1ae5da4">mlpack::ann::RecurrentAttention::IntermediateGradient</a></div><div class="ttdeci">void IntermediateGradient()</div><div class="ttdoc">Calculate the gradient of the attention module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00149">recurrent_attention.hpp:149</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a362e8cfdc65bb93f1c42d151aeb285b1"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a362e8cfdc65bb93f1c42d151aeb285b1">mlpack::ann::RecurrentAttention::InputParameter</a></div><div class="ttdeci">InputDataType const & InputParameter() const </div><div class="ttdoc">Get the input parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00122">recurrent_attention.hpp:122</a></div></div>
|
|
<div class="ttc" id="namespacemlpack_1_1ann_html_ab8d68f366a3cbbbc1f0f4990ec70c645"><div class="ttname"><a href="namespacemlpack_1_1ann.html#ab8d68f366a3cbbbc1f0f4990ec70c645">mlpack::ann::LayerTypes</a></div><div class="ttdeci">boost::variant< Add< arma::mat, arma::mat > *, AddMerge< arma::mat, arma::mat > *, BaseLayer< LogisticFunction, arma::mat, arma::mat > *, BaseLayer< IdentityFunction, arma::mat, arma::mat > *, BaseLayer< TanhFunction, arma::mat, arma::mat > *, BaseLayer< RectifierFunction, arma::mat, arma::mat > *, Concat< arma::mat, arma::mat > *, ConcatPerformance< NegativeLogLikelihood< arma::mat, arma::mat >, arma::mat, arma::mat > *, Constant< arma::mat, arma::mat > *, Convolution< NaiveConvolution< ValidConvolution >, NaiveConvolution< FullConvolution >, NaiveConvolution< ValidConvolution >, arma::mat, arma::mat > *, DropConnect< arma::mat, arma::mat > *, Dropout< arma::mat, arma::mat > *, Glimpse< arma::mat, arma::mat > *, HardTanH< arma::mat, arma::mat > *, Join< arma::mat, arma::mat > *, LeakyReLU< arma::mat, arma::mat > *, Linear< arma::mat, arma::mat > *, LinearNoBias< arma::mat, arma::mat > *, LogSoftMax< arma::mat, arma::mat > *, Lookup< arma::mat, arma::mat > *, LSTM< arma::mat, arma::mat > *, MaxPooling< arma::mat, arma::mat > *, MeanPooling< arma::mat, arma::mat > *, MeanSquaredError< arma::mat, arma::mat > *, MultiplyConstant< arma::mat, arma::mat > *, NegativeLogLikelihood< arma::mat, arma::mat > *, PReLU< arma::mat, arma::mat > *, Recurrent< arma::mat, arma::mat > *, RecurrentAttention< arma::mat, arma::mat > *, ReinforceNormal< arma::mat, arma::mat > *, Select< arma::mat, arma::mat > *, Sequential< arma::mat, arma::mat > *, VRClassReward< arma::mat, arma::mat > * > LayerTypes</div><div class="ttdef"><b>Definition:</b> <a href="layer__types_8hpp_source.html#l00115">layer_types.hpp:115</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ade55fa8342c9bcae3ae77014b01606a7"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ade55fa8342c9bcae3ae77014b01606a7">mlpack::ann::RecurrentAttention::initialModule</a></div><div class="ttdeci">LayerTypes initialModule</div><div class="ttdoc">Locally-stored initial module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00199">recurrent_attention.hpp:199</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aaebc417fc7f43c6648eea3f034e43456"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aaebc417fc7f43c6648eea3f034e43456">mlpack::ann::RecurrentAttention::Parameters</a></div><div class="ttdeci">OutputDataType const & Parameters() const </div><div class="ttdoc">Get the parameters. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00117">recurrent_attention.hpp:117</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a5203a680eb6615ecf60ea59db7528c0d"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5203a680eb6615ecf60ea59db7528c0d">mlpack::ann::RecurrentAttention::Deterministic</a></div><div class="ttdeci">bool & Deterministic()</div><div class="ttdoc">Modify the value of the deterministic parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00114">recurrent_attention.hpp:114</a></div></div>
|
|
<div class="ttc" id="sequential_8hpp_html"><div class="ttname"><a href="sequential_8hpp.html">sequential.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1GradientVisitor_html"><div class="ttname"><a href="classmlpack_1_1ann_1_1GradientVisitor.html">mlpack::ann::GradientVisitor</a></div><div class="ttdoc">SearchModeVisitor executes the Gradient() method of the given module using the input and delta parame...</div><div class="ttdef"><b>Definition:</b> <a href="gradient__visitor_8hpp_source.html#l00028">gradient_visitor.hpp:28</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a254ceb823abc1b36daee61038254a5c0"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a254ceb823abc1b36daee61038254a5c0">mlpack::ann::RecurrentAttention::resetVisitor</a></div><div class="ttdeci">ResetVisitor resetVisitor</div><div class="ttdoc">Locally-stored reset visitor. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00253">recurrent_attention.hpp:253</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a090a6ff673e3cb209ca87711dfca899f"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a090a6ff673e3cb209ca87711dfca899f">mlpack::ann::RecurrentAttention::InputParameter</a></div><div class="ttdeci">InputDataType & InputParameter()</div><div class="ttdoc">Modify the input parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00124">recurrent_attention.hpp:124</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a85cfb3c933cc1e4dd5c0c71417c59a25"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a85cfb3c933cc1e4dd5c0c71417c59a25">mlpack::ann::RecurrentAttention::inputParameter</a></div><div class="ttdeci">InputDataType inputParameter</div><div class="ttdoc">Locally-stored input parameter object. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00232">recurrent_attention.hpp:232</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a33034968bc81db083711bac84dc4a1cf"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a33034968bc81db083711bac84dc4a1cf">mlpack::ann::RecurrentAttention::weightSizeVisitor</a></div><div class="ttdeci">WeightSizeVisitor weightSizeVisitor</div><div class="ttdoc">Locally-stored weight size visitor. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00211">recurrent_attention.hpp:211</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a5a0314639c2ebd6e6dc6cab29139ab49"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a5a0314639c2ebd6e6dc6cab29139ab49">mlpack::ann::RecurrentAttention::Delta</a></div><div class="ttdeci">OutputDataType & Delta()</div><div class="ttdoc">Modify the delta. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00134">recurrent_attention.hpp:134</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1DeltaVisitor_html"><div class="ttname"><a href="classmlpack_1_1ann_1_1DeltaVisitor.html">mlpack::ann::DeltaVisitor</a></div><div class="ttdoc">DeltaVisitor exposes the delta parameter of the given module. </div><div class="ttdef"><b>Definition:</b> <a href="delta__visitor_8hpp_source.html#l00027">delta_visitor.hpp:27</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ac1e14d38436eb66b0a65710848b1b9be"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac1e14d38436eb66b0a65710848b1b9be">mlpack::ann::RecurrentAttention::Deterministic</a></div><div class="ttdeci">bool Deterministic() const </div><div class="ttdoc">The value of the deterministic parameter. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00112">recurrent_attention.hpp:112</a></div></div>
|
|
<div class="ttc" id="layer__types_8hpp_html"><div class="ttname"><a href="layer__types_8hpp.html">layer_types.hpp</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a47f4316b9656db9830d27db4ef7dd79a"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a47f4316b9656db9830d27db4ef7dd79a">mlpack::ann::RecurrentAttention::intermediateGradient</a></div><div class="ttdeci">arma::mat intermediateGradient</div><div class="ttdoc">Locally-stored intermediate gradient for the attention module. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00259">recurrent_attention.hpp:259</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a2c0e2e07af58601c50749b1046d80973"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a2c0e2e07af58601c50749b1046d80973">mlpack::ann::RecurrentAttention::gradient</a></div><div class="ttdeci">OutputDataType gradient</div><div class="ttdoc">Locally-stored gradient object. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00229">recurrent_attention.hpp:229</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a71e9916813df3cd97b852b7aca842e8f"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a71e9916813df3cd97b852b7aca842e8f">mlpack::ann::RecurrentAttention::actionDelta</a></div><div class="ttdeci">arma::mat actionDelta</div><div class="ttdoc">Locally-stored action delta. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00244">recurrent_attention.hpp:244</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a7d007c1d41cc9894fcd45075f8815d26"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a7d007c1d41cc9894fcd45075f8815d26">mlpack::ann::RecurrentAttention::feedbackOutputParameter</a></div><div class="ttdeci">std::vector< arma::mat > feedbackOutputParameter</div><div class="ttdoc">Locally-stored feedback output parameters. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00220">recurrent_attention.hpp:220</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_a77b811d4b1991f8928d8a1f39e911048"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#a77b811d4b1991f8928d8a1f39e911048">mlpack::ann::RecurrentAttention::deterministic</a></div><div class="ttdeci">bool deterministic</div><div class="ttdoc">If true dropout and scaling is disabled, see notes above. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00193">recurrent_attention.hpp:193</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_ac4148977cfbd072efc7c650ba99113af"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#ac4148977cfbd072efc7c650ba99113af">mlpack::ann::RecurrentAttention::Model</a></div><div class="ttdeci">std::vector< LayerTypes > & Model()</div><div class="ttdoc">Get the model modules. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00109">recurrent_attention.hpp:109</a></div></div>
|
|
<div class="ttc" id="classmlpack_1_1ann_1_1RecurrentAttention_html_aab4436c184e8d3d9c92836140b6e7b23"><div class="ttname"><a href="classmlpack_1_1ann_1_1RecurrentAttention.html#aab4436c184e8d3d9c92836140b6e7b23">mlpack::ann::RecurrentAttention::network</a></div><div class="ttdeci">std::vector< LayerTypes > network</div><div class="ttdoc">Locally-stored model modules. </div><div class="ttdef"><b>Definition:</b> <a href="recurrent__attention_8hpp_source.html#l00205">recurrent_attention.hpp:205</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
<!-- start footer part -->
|
|
<hr class="footer"/><address class="footer"><small>
|
|
Generated by  <a href="http://www.doxygen.org/index.html">
|
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
|
</a> 1.8.11
|
|
</small></address>
|
|
</body>
|
|
<script type="text/javascript">
|
|
var x = document.getElementsByClassName("formulaDsp");
|
|
var i;
|
|
for (i = 0; i < x.length; i++)
|
|
{
|
|
x[i].width /= 4;
|
|
}
|
|
</script>
|
|
</html>
|