Browse Source

Added linear activation function.

pull/3/head
Lewis Van Winkle 4 years ago
parent
commit
29264145be
2 changed files with 6 additions and 0 deletions
  1. +5
    -0
      genann.c
  2. +1
    -0
      genann.h

+ 5
- 0
genann.c 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;


+ 1
- 0
genann.h 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


Loading…
Cancel
Save