-
Notifications
You must be signed in to change notification settings - Fork 1
/
ActivationFunctions_8h_source.html
139 lines (137 loc) · 14.2 KB
/
ActivationFunctions_8h_source.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!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.4"/>
<title>OpenANN: OpenANN/ActivationFunctions.h 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/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.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="projectlogo"><img alt="Logo" src="openann-logo-small.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">OpenANN
 <span id="projectnumber">1.1.0</span>
</div>
<div id="projectbrief">An open source library for artificial neural networks.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<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="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>List</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)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark"> </span>Pages</a></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_f128aa1447a98eefc0df3f91bf5f583f.html">OpenANN</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">ActivationFunctions.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="ActivationFunctions_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="preprocessor">#ifndef OPENANN_ACTIVATION_FUNCTIONS_H_</span></div>
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="preprocessor"></span><span class="preprocessor">#define OPENANN_ACTIVATION_FUNCTIONS_H_</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="preprocessor">#include <Eigen/Core></span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> </div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html"> 6</a></span> <span class="keyword">namespace </span>OpenANN</div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> {</div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968"> 9</a></span> <span class="keyword">enum</span> <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968">ActivationFunction</a></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> {</div>
<div class="line"><a name="l00018"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968ab78593ece2753677cebf6e7626324df0"> 18</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968ab78593ece2753677cebf6e7626324df0" title="Logistic sigmoid activation function. ">LOGISTIC</a> = 0,</div>
<div class="line"><a name="l00026"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a46423bdbbb11f9476b855af34db6276c"> 26</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a46423bdbbb11f9476b855af34db6276c" title="Tanh sigmoid function. ">TANH</a> = 1,</div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a928953a3ea8b89bcc0ee5f2ac5b8fdd6"> 36</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a928953a3ea8b89bcc0ee5f2ac5b8fdd6" title="Scaled tanh sigmoid function. ">TANH_SCALED</a> = 2,</div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a26043e80c6baf5748e72be4564bff809"> 49</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a26043e80c6baf5748e72be4564bff809" title="Biologically inspired, non-saturating rectified linear unit (ReLU). ">RECTIFIER</a> = 3,</div>
<div class="line"><a name="l00061"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a456eee42b94176acac5ac07ebb1e4e87"> 61</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a456eee42b94176acac5ac07ebb1e4e87" title="Identity function. ">LINEAR</a> = 4,</div>
<div class="line"><a name="l00073"></a><span class="lineno"><a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a5f70248b255b5256d4c09a82f6a0d057"> 73</a></span>  <a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968a5f70248b255b5256d4c09a82f6a0d057" title="Softmax activation function. ">SOFTMAX</a> = 4</div>
<div class="line"><a name="l00074"></a><span class="lineno"> 74</span> };</div>
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#ab7f3ed147bc552e4b8a9077f6f3df495">activationFunction</a>(<a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968">ActivationFunction</a> act, <span class="keyword">const</span> Eigen::MatrixXd& a,</div>
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a878e245d8884e43ef328313c8d0c0f8b">activationFunctionDerivative</a>(<a class="code" href="namespaceOpenANN.html#a90e479eb54bb177043ce063427022968">ActivationFunction</a> act,</div>
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  <span class="keyword">const</span> Eigen::MatrixXd& z,</div>
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span> </div>
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a853afb614326441bac554d2adf233c05">softmax</a>(Eigen::MatrixXd& <a class="code" href="namespacexor.html#ac10c3225dba7d99e545014d575bd3af4">y</a>);</div>
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#aedc9e2e4c880c0328f37833c827965fe">logistic</a>(<span class="keyword">const</span> Eigen::MatrixXd& a, Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#ae49b91b9a709243b18994f491f914279">logisticDerivative</a>(<span class="keyword">const</span> Eigen::MatrixXd& z, Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a04aa03b9e247086c2df8f4f5861958c9">normaltanh</a>(<span class="keyword">const</span> Eigen::MatrixXd& a, Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#abadd5ca6402cb8210d9a47c405e91974">normaltanhDerivative</a>(<span class="keyword">const</span> Eigen::MatrixXd& z, Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a471ec404a5bdbfc37fde7db7dd8c31fe">scaledtanh</a>(<span class="keyword">const</span> Eigen::MatrixXd& a, Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#abd397c136a0575e0544d83f0d72526ec">scaledtanhDerivative</a>(<span class="keyword">const</span> Eigen::MatrixXd& z, Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a628aa9c008039a51aefa43831840d911">rectifier</a>(<span class="keyword">const</span> Eigen::MatrixXd& a, Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#af9ce352ce451b7caa9c64e10921db865">rectifierDerivative</a>(<span class="keyword">const</span> Eigen::MatrixXd& z, Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#aed0b9da7fd6dbbdbde19813833096644">linear</a>(<span class="keyword">const</span> Eigen::MatrixXd& a, Eigen::MatrixXd& z);</div>
<div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keywordtype">void</span> <a class="code" href="namespaceOpenANN.html#a9b72c2456c631e4f37ffd40a6f57771a">linearDerivative</a>(Eigen::MatrixXd& gd);</div>
<div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div>
<div class="line"><a name="l00094"></a><span class="lineno"> 94</span> } <span class="comment">// namespace OpenANN</span></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="preprocessor">#endif // OPENANN_ACTIVATION_FUNCTIONS_H_</span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by  <a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>