24 #ifndef __NETWORKLAYER_H
25 #define __NETWORKLAYER_H
51 fprintf(stderr,
"%s %s\n",
"Layer::Layer(): this contructor is obsolete! ",
52 "Please use the one without dactfun now!\n");
58 bool store(FILE* f)
const;
Interface for objects, that can be stored and restored to/from a file stream (binary).
Definition: storeable.h:33
double factor_bias
Definition: layer.h:66
Layer(int size, double factor_bias, ActivationFunction actfun, ActivationFunction dactfun)
obsolete, use the other constructor for Layer.
Definition: layer.h:48
bool restore(FILE *f)
restores the layer binary from file stream
Definition: layer.cpp:82
double(* InvActivationFunction)(double, double)
inverse of Activation function with respect to some membrane potential and a certain output error...
Definition: feedforwardnn.h:38
InvActivationFunction invactfun
inversion of activation function
Definition: layer.h:69
Layer(int size, double factor_bias=0.1, ActivationFunction actfun=FeedForwardNN::linear)
constructor for Layer.
Definition: layer.cpp:48
void setActFun(ActivationFunction actfun)
sets the activation function of the layer
Definition: layer.cpp:54
ActivationFunction actfun
callback activation function
Definition: layer.h:67
double(* ActivationFunction)(double)
activation function type: input: membrane potential
Definition: feedforwardnn.h:34
static double linear(double z)
Definition: feedforwardnn.h:54
friend std::ostream & operator<<(std::ostream &, const Layer &)
Definition: layer.cpp:105
ActivationFunction dactfun
first derivative of the activation function
Definition: layer.h:68
int size
Definition: layer.h:65
bool store(FILE *f) const
stores the layer binary into file stream
Definition: layer.cpp:77