|
Qualia
0.2
|
#include <GradientFunction.h>


Public Member Functions | |
| GradientFunction () | |
| virtual | ~GradientFunction () |
| virtual void | clearDelta () |
| Clears the derivatives. More... | |
| virtual unsigned int | nParams () const =0 |
| Returns the number of parameters. More... | |
| virtual void | backpropagate (real *outputError)=0 |
| Backpropagates the error, updating the derivatives. More... | |
| virtual void | update ()=0 |
| Updates the weights according to the derivatives. More... | |
| virtual void | save (XFile *file) |
| Saves the model to a file. More... | |
| virtual void | load (XFile *file) |
| Loads the model from a file. More... | |
Public Member Functions inherited from Function | |
| Function () | |
| virtual | ~Function () |
| virtual void | init () |
| Initializes the function. More... | |
| virtual unsigned | nInputs () const =0 |
| Returns the number of inputs. More... | |
| virtual unsigned | nOutputs () const =0 |
| Returns the number of outputs. More... | |
| virtual void | setInputs (const real *input) |
| Sets the value of the inputs. More... | |
| virtual void | getOutputs (real *output) const |
| Get the value of the outputs. More... | |
| virtual void | setInput (int i, real x)=0 |
| Sets input i to value x. More... | |
| virtual float | getOutput (int i) const =0 |
| Get output i. More... | |
| virtual void | propagate ()=0 |
| Propagates inputs to outputs. More... | |
Public Attributes | |
| real * | weights |
| The weights (parameters) of the gradient function. More... | |
| real * | dWeights |
| The derivatives of the weights. More... | |
Abstract class for gradient functions, such as a NeuralNetwork. A GradientFunction has a set of parameters (weights) and error derivatives. It can back-propagate the errors to compute the derivatives and udpate its weights accordingly.
|
inline |
|
inlinevirtual |
|
pure virtual |
Backpropagates the error, updating the derivatives.
Implemented in NeuralNetwork, and QFunction.
|
inlinevirtual |
Clears the derivatives.
|
inlinevirtual |
|
pure virtual |
Returns the number of parameters.
Implemented in NeuralNetwork, and QFunction.
|
inlinevirtual |
|
pure virtual |
Updates the weights according to the derivatives.
Implemented in NeuralNetwork, and QFunction.
| real* GradientFunction::dWeights |
The derivatives of the weights.
| real* GradientFunction::weights |
The weights (parameters) of the gradient function.
1.8.3.1