#include <multilayerffnn.h>
Inherits Storeable.
Inheritance diagram for Layer:


Public Member Functions | |
| Layer (int size, double factor_bias=0.1, ActivationFunction actfun=FeedForwardNN::linear) | |
| constructor for Layer. | |
| Layer (int size, double factor_bias, ActivationFunction actfun, ActivationFunction dactfun) | |
| obsolete, use the other constructor for Layer. | |
| bool | store (FILE *f) const |
| stores the layer binary into file stream | |
| bool | restore (FILE *f) |
| restores the layer binary from file stream | |
| void | setActFun (ActivationFunction actfun) |
| sets the activation function of the layer | |
Public Attributes | |
| int | size |
| double | factor_bias |
| ActivationFunction | actfun |
| callback activation function | |
| ActivationFunction | dactfun |
| first derivative of the activation function | |
| InvActivationFunction | invactfun |
| inversion of activation function | |
Friends | |
| std::ostream & | operator<< (std::ostream &, const Layer &) |
| Layer | ( | int | size, | |
| double | factor_bias = 0.1, |
|||
| ActivationFunction | actfun = FeedForwardNN::linear | |||
| ) |
constructor for Layer.
The derivative and inverse of activation function is derived automatically.
| size | number neurons | |
| factor_bias | size of bias neuron , if 0 no bias is used | |
| actfun | activation function. see also FeedForwardNN |
| Layer | ( | int | size, | |
| double | factor_bias, | |||
| ActivationFunction | actfun, | |||
| ActivationFunction | dactfun | |||
| ) | [inline] |
obsolete, use the other constructor for Layer.
| size | number neurons | |
| factor_bias | size of bias neuron , if 0 no bias is used | |
| actfun | activation function. see also FeedForwardNN | |
| dactfun | derivative of activation function (should be consistent with actfun) |
| bool restore | ( | FILE * | f | ) | [virtual] |
| void setActFun | ( | ActivationFunction | actfun | ) |
sets the activation function of the layer
| bool store | ( | FILE * | f | ) | const [virtual] |
| std::ostream& operator<< | ( | std::ostream & | str, | |
| const Layer & | l | |||
| ) | [friend] |
callback activation function
first derivative of the activation function
| double factor_bias |
inversion of activation function
| int size |
1.4.7