Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Layer Class Reference

#include <layer.h>

Inheritance diagram for Layer:
Collaboration diagram for Layer:

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 &)
 

Constructor & Destructor Documentation

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.

Parameters
sizenumber neurons
factor_biassize of bias neuron , if 0 no bias is used
actfunactivation function. see also FeedForwardNN
Layer ( int  size,
double  factor_bias,
ActivationFunction  actfun,
ActivationFunction  dactfun 
)
inline

obsolete, use the other constructor for Layer.

Parameters
sizenumber neurons
factor_biassize of bias neuron , if 0 no bias is used
actfunactivation function. see also FeedForwardNN
dactfunderivative of activation function (should be consistent with actfun)

Member Function Documentation

bool restore ( FILE *  f)
virtual

restores the layer binary from file stream

Implements Storeable.

void setActFun ( ActivationFunction  actfun)

sets the activation function of the layer

bool store ( FILE *  f) const
virtual

stores the layer binary into file stream

Implements Storeable.

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  str,
const Layer l 
)
friend

Member Data Documentation

callback activation function

first derivative of the activation function

double factor_bias

inversion of activation function

int size

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