diff --git a/genann.c b/genann.c index 813451b..daa99bf 100644 --- a/genann.c +++ b/genann.c @@ -75,6 +75,11 @@ double genann_act_threshold(double a) { } +double genann_act_linear(double a) { + return a; +} + + genann *genann_init(int inputs, int hidden_layers, int hidden, int outputs) { if (hidden_layers < 0) return 0; if (inputs < 1) return 0; diff --git a/genann.h b/genann.h index ab54d9e..3678ab6 100644 --- a/genann.h +++ b/genann.h @@ -100,6 +100,7 @@ void genann_write(genann const *ann, FILE *out); double genann_act_sigmoid(double a); double genann_act_sigmoid_cached(double a); double genann_act_threshold(double a); +double genann_act_linear(double a); #ifdef __cplusplus