OpenANN
1.1.0
An open source library for artificial neural networks.
Main Page
Classes
Files
List
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
OpenANN
layers
FullyConnected.h
Go to the documentation of this file.
1
#ifndef OPENANN_LAYERS_FULLY_CONNECTED_H_
2
#define OPENANN_LAYERS_FULLY_CONNECTED_H_
3
4
#include <
OpenANN/layers/Layer.h
>
5
#include <
OpenANN/ActivationFunctions.h
>
6
#include <
OpenANN/Regularization.h
>
7
8
namespace
OpenANN
9
{
10
61
class
FullyConnected
:
public
Layer
62
{
63
protected
:
64
int
I
,
J
;
65
bool
bias
;
66
ActivationFunction
act
;
67
double
stdDev
;
68
Eigen::MatrixXd
W
;
69
Eigen::MatrixXd
Wd
;
70
Eigen::VectorXd
b
;
71
Eigen::VectorXd
bd
;
72
Eigen::MatrixXd*
x
;
73
Eigen::MatrixXd
a
;
74
Eigen::MatrixXd
y
;
75
Eigen::MatrixXd
yd
;
76
Eigen::MatrixXd
deltas
;
77
Eigen::MatrixXd
e
;
78
Regularization
regularization
;
79
80
public
:
81
FullyConnected
(
OutputInfo
info
,
int
J
,
bool
bias
,
ActivationFunction
act
,
82
double
stdDev
,
Regularization
regularization
);
83
virtual
OutputInfo
initialize
(std::vector<double*>& parameterPointers,
84
std::vector<double*>& parameterDerivativePointers);
85
virtual
void
initializeParameters
();
86
virtual
void
updatedParameters
();
87
virtual
void
forwardPropagate
(Eigen::MatrixXd*
x
, Eigen::MatrixXd*&
y
,
88
bool
dropout,
double
*
error
= 0);
89
virtual
void
backpropagate
(Eigen::MatrixXd* ein, Eigen::MatrixXd*& eout,
90
bool
backpropToPrevious);
91
virtual
Eigen::MatrixXd&
getOutput
();
92
virtual
Eigen::VectorXd
getParameters
();
93
};
94
95
}
// namespace OpenANN
96
97
#endif // OPENANN_LAYERS_FULLY_CONNECTED_H_
Generated on Wed Jul 9 2014 08:57:52 for OpenANN by
1.8.4