2022-07-05 08:13:25 +02:00
|
|
|
#include "struct.h"
|
2022-09-23 14:25:56 +02:00
|
|
|
#include "initialisation.h"
|
2022-07-05 08:13:25 +02:00
|
|
|
|
|
|
|
#ifndef DEF_CREATION_H
|
|
|
|
#define DEF_CREATION_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Créé un réseau qui peut contenir max_size couche (dont celle d'input et d'output)
|
|
|
|
*/
|
2023-03-13 18:47:32 +01:00
|
|
|
Network* create_network(int max_size, float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Renvoie un réseau suivant l'architecture LeNet5
|
|
|
|
*/
|
2022-11-15 18:15:18 +01:00
|
|
|
Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
2023-01-21 18:59:59 +01:00
|
|
|
/*
|
2023-03-15 21:27:57 +01:00
|
|
|
* Renvoie un réseau sans convolution, similaire à celui utilisé dans src/dense
|
2023-01-21 18:59:59 +01:00
|
|
|
*/
|
|
|
|
Network* create_simple_one(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth);
|
|
|
|
|
2022-07-05 08:13:25 +02:00
|
|
|
/*
|
|
|
|
* Créé et alloue de la mémoire à une couche de type input cube
|
|
|
|
*/
|
2022-10-31 20:08:42 +01:00
|
|
|
void create_a_cube_input_layer(Network* network, int pos, int depth, int dim);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Créé et alloue de la mémoire à une couche de type input_z cube
|
|
|
|
*/
|
|
|
|
void create_a_cube_input_z_layer(Network* network, int pos, int depth, int dim);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Créé et alloue de la mémoire à une couche de type ligne
|
|
|
|
*/
|
|
|
|
void create_a_line_input_layer(Network* network, int pos, int dim);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Ajoute au réseau une couche d'average pooling valide de dimension dim*dim
|
|
|
|
*/
|
2023-03-08 20:48:34 +01:00
|
|
|
void add_average_pooling(Network* network, int dim_output);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
2023-01-30 09:39:45 +01:00
|
|
|
/*
|
|
|
|
* Ajoute au réseau une couche de max pooling valide de dimension dim*dim
|
|
|
|
*/
|
2023-03-08 20:48:34 +01:00
|
|
|
void add_max_pooling(Network* network, int dim_output);
|
2023-01-30 09:39:45 +01:00
|
|
|
|
2022-07-05 08:13:25 +02:00
|
|
|
/*
|
2022-09-19 18:39:49 +02:00
|
|
|
* Ajoute au réseau une couche de convolution dim*dim et initialise les kernels
|
2022-07-05 08:13:25 +02:00
|
|
|
*/
|
2022-10-03 10:22:12 +02:00
|
|
|
void add_convolution(Network* network, int depth_output, int dim_output, int activation);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
|
|
|
/*
|
2022-09-19 18:39:49 +02:00
|
|
|
* Ajoute au réseau une couche dense et initialise les poids et les biais
|
2022-07-05 08:13:25 +02:00
|
|
|
*/
|
2023-02-19 12:53:08 +01:00
|
|
|
void add_dense(Network* network, int size_output, int activation);
|
2022-07-05 08:13:25 +02:00
|
|
|
|
2022-09-19 18:39:49 +02:00
|
|
|
/*
|
|
|
|
* Ajoute au réseau une couche dense qui aplatit
|
|
|
|
*/
|
2023-02-19 12:53:08 +01:00
|
|
|
void add_dense_linearisation(Network* network, int size_output, int activation);
|
2022-09-19 18:39:49 +02:00
|
|
|
|
2022-07-05 08:13:25 +02:00
|
|
|
#endif
|