OpenANN  1.1.0
An open source library for artificial neural networks.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
List of all members | Public Member Functions
OpenANN::Subsampling Class Reference

Performs average pooling on 2D input feature maps. More...

#include <Subsampling.h>

+ Inheritance diagram for OpenANN::Subsampling:

Public Member Functions

 Subsampling (OutputInfo info, int kernelRows, int kernelCols, bool bias, ActivationFunction act, double stdDev, Regularization regularization)
 
virtual OutputInfo initialize (std::vector< double * > &parameterPointers, std::vector< double * > &parameterDerivativePointers)
 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 ()
 

Detailed Description

Performs average pooling on 2D input feature maps.

In a subsampling layer non-overlapping regions are combined to achieve minor translation invariance and to reduce the number of nodes. Subsampling was the only pooling layer in classical convolutional neural networks.

The components of each region will be summed up, multiplied by a weight and added to a bias to compute the activation of a neuron. Then we apply an activation function.

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.

Constructor & Destructor Documentation

OpenANN::Subsampling::Subsampling ( OutputInfo  info,
int  kernelRows,
int  kernelCols,
bool  bias,
ActivationFunction  act,
double  stdDev,
Regularization  regularization 
)

Member Function Documentation

virtual void OpenANN::Subsampling::backpropagate ( Eigen::MatrixXd *  ein,
Eigen::MatrixXd *&  eout,
bool  backpropToPrevious 
)
virtual

Backpropagation in this layer.

Parameters
einpointer to error signal of the higher layer
eoutreturns a pointer to error signal of the layer (derivative of the error with respect to the input)
backpropToPreviousbackpropagate errors to previous layers

Implements OpenANN::Layer.

virtual void OpenANN::Subsampling::forwardPropagate ( Eigen::MatrixXd *  x,
Eigen::MatrixXd *&  y,
bool  dropout,
double *  error = 0 
)
virtual

Forward propagation in this layer.

Parameters
xpointer to input of the layer (with bias)
yreturns a pointer to output of the layer
dropoutenable dropout for regularization
errorerror value, will be updated with regularization terms

Implements OpenANN::Layer.

virtual Eigen::MatrixXd& OpenANN::Subsampling::getOutput ( )
virtual

Output after last forward propagation.

Returns
output

Implements OpenANN::Layer.

virtual Eigen::VectorXd OpenANN::Subsampling::getParameters ( )
virtual

Get the current values of parameters (weights, biases, ...).

Returns
parameters

Implements OpenANN::Layer.

virtual OutputInfo OpenANN::Subsampling::initialize ( std::vector< double * > &  parameterPointers,
std::vector< double * > &  parameterDerivativePointers 
)
virtual

Fill in the parameter pointers and parameter derivative pointers.

Parameters
parameterPointerspointers to parameters
parameterDerivativePointerspointers to derivatives of parameters
Returns
information about the output of the layer

Implements OpenANN::Layer.

virtual void OpenANN::Subsampling::initializeParameters ( )
virtual

Initialize the parameters.

This is usually called before each optimization.

Implements OpenANN::Layer.

virtual void OpenANN::Subsampling::updatedParameters ( )
inlinevirtual

Generate internal parameters from externally visible parameters.

This is usually called after each parameter update.

Implements OpenANN::Layer.


The documentation for this class was generated from the following file: