Added linear activation function.

This commit is contained in:
Lewis Van Winkle 2016-05-19 16:55:44 -05:00
parent 6ece821187
commit 29264145be
2 changed files with 6 additions and 0 deletions

View File

@ -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;

View File

@ -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