Adding fisrt files
Cette révision appartient à :
Parent
705fe13880
révision
f716f8badb
6 fichiers modifiés avec 59 ajouts et 0 suppressions
1
Makefile
Fichier normal
1
Makefile
Fichier normal
|
|
@ -0,0 +1 @@
|
||||||
|
default : executable
|
||||||
11
main.c
Fichier normal
11
main.c
Fichier normal
|
|
@ -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
Fichier normal
10
network.c
Fichier normal
|
|
@ -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
Fichier normal
13
network.h
Fichier normal
|
|
@ -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
Fichier normal
10
neurons.c
Fichier normal
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include "neurons.h"
|
||||||
|
|
||||||
|
Neuron *init_neuron()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
14
neurons.h
Fichier normal
14
neurons.h
Fichier normal
|
|
@ -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
|
||||||
Chargement…
Référencer dans un nouveau ticket