From f716f8badb4021f897103a0f3806e1756bc0aa79 Mon Sep 17 00:00:00 2001 From: chabisik Date: Sat, 27 Nov 2021 10:46:33 +0100 Subject: [PATCH] Adding fisrt files --- Makefile | 1 + main.c | 11 +++++++++++ network.c | 10 ++++++++++ network.h | 13 +++++++++++++ neurons.c | 10 ++++++++++ neurons.h | 14 ++++++++++++++ 6 files changed, 59 insertions(+) create mode 100644 Makefile create mode 100644 main.c create mode 100644 network.c create mode 100644 network.h create mode 100644 neurons.c create mode 100644 neurons.h diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ea7ec8e --- /dev/null +++ b/Makefile @@ -0,0 +1 @@ +default : executable diff --git a/main.c b/main.c new file mode 100644 index 0000000..00e4e26 --- /dev/null +++ b/main.c @@ -0,0 +1,11 @@ +#include +#include +#include +#include "neurons.h" +#include "network.h" + +int main(int argc, char *argv[]) +{ + printf("Bonjour et bienvenu ;)\n"); + return 0; +} \ No newline at end of file diff --git a/network.c b/network.c new file mode 100644 index 0000000..7aef52c --- /dev/null +++ b/network.c @@ -0,0 +1,10 @@ +#include +#include +#include +#include "neurons.h" +#include "network.h" + +Neuron *generate_layer(int n_neurons, int n_neurons_prev_layer) +{ + +} \ No newline at end of file diff --git a/network.h b/network.h new file mode 100644 index 0000000..4111437 --- /dev/null +++ b/network.h @@ -0,0 +1,13 @@ +#ifndef NETWORK_H +#define NETWORK_H + +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 +}; + + +#endif \ No newline at end of file diff --git a/neurons.c b/neurons.c new file mode 100644 index 0000000..1b47129 --- /dev/null +++ b/neurons.c @@ -0,0 +1,10 @@ +#include +#include +#include +#include "neurons.h" + +Neuron *init_neuron() +{ + +} + diff --git a/neurons.h b/neurons.h new file mode 100644 index 0000000..a4ca2f9 --- /dev/null +++ b/neurons.h @@ -0,0 +1,14 @@ +#ifndef NEURONS_H +#define NEURONS_H + +typedef struct neuron Neuron; +struct neuron +{ + float output; //output of the neuron + float *weights; //weights associated to the neuron + neuron's bias + float delta_error; //the delta error for updating current weights + Neuron *same_layer_next_neuron; +}; + + +#endif \ No newline at end of file