Robot Simulator of the Robotics Group for Self-Organization of Control
0.8.0
|
#include <layer.h>
Public Member Functions | |
Layer (int size, double factor_bias=0.1, ActivationFunction actfun=FeedForwardNN::linear) | |
constructor for Layer. More... | |
Layer (int size, double factor_bias, ActivationFunction actfun, ActivationFunction dactfun) | |
obsolete, use the other constructor for Layer. More... | |
bool | store (FILE *f) const |
stores the layer binary into file stream More... | |
bool | restore (FILE *f) |
restores the layer binary from file stream More... | |
void | setActFun (ActivationFunction actfun) |
sets the activation function of the layer More... | |
Public Member Functions inherited from Storeable | |
virtual | ~Storeable () |
bool | storeToFile (const char *filename) const |
Provided for convenience. More... | |
bool | restoreFromFile (const char *filename) |
Provided for convenience. More... | |
Public Attributes | |
int | size |
double | factor_bias |
ActivationFunction | actfun |
callback activation function More... | |
ActivationFunction | dactfun |
first derivative of the activation function More... | |
InvActivationFunction | invactfun |
inversion of activation function More... | |
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 |
|
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) |
|
virtual |
restores the layer binary from file stream
Implements Storeable.
void setActFun | ( | ActivationFunction | actfun | ) |
sets the activation function of the layer
|
virtual |
stores the layer binary into file stream
Implements Storeable.
|
friend |
ActivationFunction actfun |
callback activation function
ActivationFunction dactfun |
first derivative of the activation function
double factor_bias |
InvActivationFunction invactfun |
inversion of activation function
int size |