Adding fisrt files
This commit is contained in:
parent
705fe13880
commit
f716f8badb
6 changed files with 59 additions and 0 deletions
1
Makefile
Normal file
1
Makefile
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
default : executable
|
||||||
11
main.c
Normal file
11
main.c
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "neurons.h"
|
||||||
|
#include "network.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
printf("Bonjour et bienvenu ;)\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
10
network.c
Normal file
10
network.c
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "neurons.h"
|
||||||
|
#include "network.h"
|
||||||
|
|
||||||
|
Neuron *generate_layer(int n_neurons, int n_neurons_prev_layer)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
13
network.h
Normal file
13
network.h
Normal file
|
|
@ -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
|
||||||
10
neurons.c
Normal file
10
neurons.c
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "neurons.h"
|
||||||
|
|
||||||
|
Neuron *init_neuron()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
14
neurons.h
Normal file
14
neurons.h
Normal file
|
|
@ -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
|
||||||
Loading…
Reference in a new issue