diff --git a/activations.c b/activations.c new file mode 100644 index 0000000..91503ab --- /dev/null +++ b/activations.c @@ -0,0 +1,13 @@ +#include +#include +#include + +float sigmoid(float weighted_sum) +{ + return 1.0 / (1 + exp(-(float)weighted_sum)); +} + +float sigmoid_derivative(float output) +{ + return 1.0; +} \ No newline at end of file diff --git a/activations.h b/activations.h new file mode 100644 index 0000000..4780681 --- /dev/null +++ b/activations.h @@ -0,0 +1,7 @@ +#ifndef ACTIVATIONS_H +#define ACTIVATIONS_H + +float sigmoid(float weighted_sum); +float sigmoid_derivative(float output) + +#endif \ No newline at end of file diff --git a/main.c b/main.c index 6d6fab7..8d0276b 100644 --- a/main.c +++ b/main.c @@ -11,9 +11,10 @@ int main(int argc, char *argv[]) printf("Bonjour et bienvenu ;)\n"); int i; - for(i=1 ; i<= 30 ; i++) + /*for(i=1 ; i<= 30 ; i++) { printf("%dth generated fload = %f\n", i, random_float(0.0 , 1.0)); - } + }*/ + return 0; } \ No newline at end of file diff --git a/network.h b/network.h index 31c78f6..3fe68eb 100644 --- a/network.h +++ b/network.h @@ -5,8 +5,8 @@ typedef struct network Network; struct network { Neuron *layers_first_neurons; //first neuron of each layer of the network - Neuron *layers_last_neurons; //last neuron of each layer of the network - int number_layers; //keeps track of layers' number + //Neuron *layers_last_neurons; //last neuron of each layer of the network + int *neurons_per_layer; //keeps track of number of layers' neurons }; Neuron *generate_layer(int n_neurons, int n_neurons_prev_layer); diff --git a/training.c b/training.c new file mode 100644 index 0000000..e69de29 diff --git a/training.h b/training.h new file mode 100644 index 0000000..e69de29