OpenANN
1.1.0
An open source library for artificial neural networks.
|
Applies a learnable filter on a 2D or 3D input. More...
#include <Convolutional.h>
Public Member Functions | |
Convolutional (OutputInfo info, int featureMaps, int kernelRows, int kernelCols, bool bias, ActivationFunction act, double stdDev, Regularization regularization) | |
virtual OutputInfo | initialize (std::vector< double * > ¶meterPointers, std::vector< double * > ¶meterDerivativePointers) |
Fill in the parameter pointers and parameter derivative pointers. More... | |
virtual void | initializeParameters () |
Initialize the parameters. More... | |
virtual void | updatedParameters () |
Generate internal parameters from externally visible parameters. More... | |
virtual void | forwardPropagate (Eigen::MatrixXd *x, Eigen::MatrixXd *&y, bool dropout, double *error=0) |
Forward propagation in this layer. More... | |
virtual void | backpropagate (Eigen::MatrixXd *ein, Eigen::MatrixXd *&eout, bool backpropToPrevious) |
Backpropagation in this layer. More... | |
virtual Eigen::MatrixXd & | getOutput () |
Output after last forward propagation. More... | |
virtual Eigen::VectorXd | getParameters () |
Get the current values of parameters (weights, biases, ...). More... | |
Public Member Functions inherited from OpenANN::Layer | |
virtual | ~Layer () |
Applies a learnable filter on a 2D or 3D input.
Hence, convolutional layers can be regarded as biologically inspired trainable feature extractors. Another perspective is that they combine weight sharing and sparse connections to reduce the number of weights drastically in contrast to fully connected layers.
Each feature map in this layer is connected to each feature map in the previous layer such that we use one convolution kernel for each of these connections. After convolving the input feature maps, an activation function will be applied on the activations.
Supports the following regularization types:
[1] Yann LeCun, Léon Bottou, Yoshua Bengio and Patrick Haffner: Gradient-Based Learning Applied to Document Recognition, Intelligent Signal Processing, IEEE Press, S. Haykin and B. Kosko (Eds.), pp. 306-351, 2001.
OpenANN::Convolutional::Convolutional | ( | OutputInfo | info, |
int | featureMaps, | ||
int | kernelRows, | ||
int | kernelCols, | ||
bool | bias, | ||
ActivationFunction | act, | ||
double | stdDev, | ||
Regularization | regularization | ||
) |
|
virtual |
Backpropagation in this layer.
ein | pointer to error signal of the higher layer |
eout | returns a pointer to error signal of the layer (derivative of the error with respect to the input) |
backpropToPrevious | backpropagate errors to previous layers |
Implements OpenANN::Layer.
|
virtual |
Forward propagation in this layer.
x | pointer to input of the layer (with bias) |
y | returns a pointer to output of the layer |
dropout | enable dropout for regularization |
error | error value, will be updated with regularization terms |
Implements OpenANN::Layer.
|
virtual |
|
virtual |
Get the current values of parameters (weights, biases, ...).
Implements OpenANN::Layer.
|
virtual |
Fill in the parameter pointers and parameter derivative pointers.
parameterPointers | pointers to parameters |
parameterDerivativePointers | pointers to derivatives of parameters |
Implements OpenANN::Layer.
|
virtual |
Initialize the parameters.
This is usually called before each optimization.
Implements OpenANN::Layer.
|
inlinevirtual |
Generate internal parameters from externally visible parameters.
This is usually called after each parameter update.
Implements OpenANN::Layer.