CGradientFunction Class Reference
Interface for
all functions which support gradient update and gradient and output
calculation. More...
#include <cgradientfunction.h>
Inheritance diagram for CGradientFunction:
List of all
members.
|
Public Member Functions
|
|
|
CGradientFunction (int
n_input, int n_output)
|
|
virtual
|
~CGradientFunction
()
|
|
virtual void
|
getGradient (ColumnVector
*input, ColumnVector *outputErrors, CFeatureList
*gradientFeatures)
|
|
virtual void
|
getFunctionValue
(ColumnVector *input, ColumnVector *output)
|
| |
Interface for calculating the output value.
|
|
virtual void
|
getInputDerivation
(ColumnVector *input, Matrix *targetVector)
|
| |
Interface function for calculating the input
gradient, only optional and not implemented by all classes.
|
|
virtual void
|
getGradientPre
(ColumnVector *input, ColumnVector *outputErrors, CFeatureList
*gradientFeatures)=0
|
| |
Interface for calculating the gradient given
the input and the outputerror.
|
|
virtual void
|
getFunctionValuePre
(ColumnVector *input, ColumnVector *output)=0
|
| |
Interface for calculating the output value.
|
|
virtual void
|
getInputDerivationPre
(ColumnVector *, Matrix *)
|
| |
Interface function for calculating the input
gradient, only optional and not implemented by all classes.
|
|
virtual int
|
getNumInputs ()
|
| |
Return the dimension of the input.
|
|
virtual int
|
getNumOutputs
()
|
| |
Return the dimension of the output.
|
|
void
|
setInputMean
(ColumnVector *input_mean)
|
|
void
|
setOutputMean
(ColumnVector *output_mean)
|
|
void
|
setInputStd
(ColumnVector *input_std)
|
|
void
|
setOutputStd
(ColumnVector *output_std)
|
Protected Member Functions
|
|
virtual void
|
preprocessInput
(ColumnVector *input, ColumnVector *norm_input)
|
|
virtual void
|
postprocessOutput (Matrix
*norm_output, Matrix *output)
|
Protected Attributes
|
|
int
|
num_inputs |
|
int
|
num_outputs |
|
ColumnVector *
|
input_mean |
|
ColumnVector *
|
input_std |
|
ColumnVector *
|
output_mean |
|
ColumnVector *
|
output_std |
Detailed Description
Interface for all functions which support gradient update and
gradient and output calculation.
The class represents a n-input, m-output function approximator,
which depends on numWeights weights. Gradient functions can always
calculate the gradient with respect to the weights given an input
and the m-dimensional output given an n-dimensional input . This
interface extends CGradientUpdateFunction,
therefore all subclasses have to implement the same functions as
for the super class. Due to the additional functionality of
CGradientFunction the subclasses have to implement additionally to
the functions from CGradientUpdateFunction
following functions:
Constructor & Destructor Documentation
|
CGradientFunction::CGradientFunction
|
( |
int |
n_input,
|
|
|
int |
n_output |
|
) |
|
|
| virtual
CGradientFunction::~CGradientFunction
|
( |
|
) |
[virtual] |
|
Member Function Documentation
| virtual void
CGradientFunction::getFunctionValue
|
( |
ColumnVector
*
|
input,
|
|
|
ColumnVector * |
output |
|
) |
[virtual] |
|
| |
Interface for calculating the output
value.
|
| virtual void
CGradientFunction::getFunctionValuePre
|
( |
ColumnVector
*
|
input,
|
|
|
ColumnVector * |
output |
|
) |
[pure
virtual] |
|
| virtual void
CGradientFunction::getGradient
|
( |
ColumnVector
*
|
input,
|
|
|
ColumnVector * |
outputErrors,
|
|
|
CFeatureList *
|
gradientFeatures |
|
) |
[virtual] |
|
| virtual void
CGradientFunction::getGradientPre
|
( |
ColumnVector
*
|
input,
|
|
|
ColumnVector * |
outputErrors,
|
|
|
CFeatureList *
|
gradientFeatures |
|
) |
[pure
virtual] |
|
| virtual void
CGradientFunction::getInputDerivation
|
( |
ColumnVector
*
|
input,
|
|
|
Matrix * |
targetVector |
|
) |
[virtual] |
|
| |
Interface function for calculating the input gradient, only
optional and not implemented by all classes.
|
| virtual void
CGradientFunction::getInputDerivationPre
|
( |
ColumnVector
*
|
, |
|
|
Matrix * |
|
|
) |
[inline,
virtual] |
|
| |
Interface function for calculating the input gradient, only
optional and not implemented by all classes.
Reimplemented in CTorchGradientFunction.
|
| virtual int
CGradientFunction::getNumInputs
|
( |
|
) |
[virtual] |
|
| |
Return the dimension of the input.
|
| virtual int
CGradientFunction::getNumOutputs
|
( |
|
) |
[virtual] |
|
| |
Return the dimension of the output.
|
| virtual void
CGradientFunction::postprocessOutput
|
( |
Matrix * |
norm_output,
|
|
|
Matrix * |
output |
|
) |
[protected,
virtual] |
|
| virtual void
CGradientFunction::preprocessInput
|
( |
ColumnVector
*
|
input,
|
|
|
ColumnVector * |
norm_input |
|
) |
[protected,
virtual] |
|
| void
CGradientFunction::setInputMean
|
( |
ColumnVector
*
|
input_mean |
) |
|
|
| void
CGradientFunction::setInputStd
|
( |
ColumnVector
*
|
input_std |
) |
|
|
| void
CGradientFunction::setOutputMean
|
( |
ColumnVector
*
|
output_mean |
) |
|
|
| void
CGradientFunction::setOutputStd
|
( |
ColumnVector
*
|
output_std |
) |
|
|
Member Data Documentation
The documentation for this class was generated from the following
file:
|