mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Change of a line
This commit is contained in:
parent
adeee56f83
commit
84e05a732b
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include "include/creation.h"
|
#include "include/creation.h"
|
||||||
|
|
||||||
Network* create_network(int max_size, float learning_rate, int dropout, int initialisation, int input_dim, int input_depth) {
|
Network* create_network(int max_size, float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) {
|
||||||
if (dropout < 0 || dropout > 100) {
|
if (dropout < 0 || dropout > 100) {
|
||||||
printf_error("La probabilité de dropout n'est pas respecté, elle doit être comprise entre 0 et 100\n");
|
printf_error("La probabilité de dropout n'est pas respecté, elle doit être comprise entre 0 et 100\n");
|
||||||
}
|
}
|
||||||
@ -28,6 +28,7 @@ Network* create_network(int max_size, float learning_rate, int dropout, int init
|
|||||||
network->kernel[i] = (Kernel*)nalloc(1, sizeof(Kernel));
|
network->kernel[i] = (Kernel*)nalloc(1, sizeof(Kernel));
|
||||||
}
|
}
|
||||||
network->kernel[0]->linearisation = DOESNT_LINEARISE;
|
network->kernel[0]->linearisation = DOESNT_LINEARISE;
|
||||||
|
network->kernel[0]->activation = activation;
|
||||||
network->width[0] = input_dim;
|
network->width[0] = input_dim;
|
||||||
network->depth[0] = input_depth;
|
network->depth[0] = input_depth;
|
||||||
network->kernel[0]->nn = NULL;
|
network->kernel[0]->nn = NULL;
|
||||||
@ -38,8 +39,7 @@ Network* create_network(int max_size, float learning_rate, int dropout, int init
|
|||||||
}
|
}
|
||||||
|
|
||||||
Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) {
|
Network* create_network_lenet5(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) {
|
||||||
Network* network = create_network(8, learning_rate, dropout, initialisation, input_dim, input_depth);
|
Network* network = create_network(8, learning_rate, dropout, activation, initialisation, input_dim, input_depth);
|
||||||
network->kernel[0]->activation = activation;
|
|
||||||
add_convolution(network, 6, 28, activation);
|
add_convolution(network, 6, 28, activation);
|
||||||
add_average_pooling(network, 14);
|
add_average_pooling(network, 14);
|
||||||
add_convolution(network, 16, 10, activation);
|
add_convolution(network, 16, 10, activation);
|
||||||
@ -51,8 +51,7 @@ Network* create_network_lenet5(float learning_rate, int dropout, int activation,
|
|||||||
}
|
}
|
||||||
|
|
||||||
Network* create_simple_one(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) {
|
Network* create_simple_one(float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth) {
|
||||||
Network* network = create_network(3, learning_rate, dropout, initialisation, input_dim, input_depth);
|
Network* network = create_network(3, learning_rate, dropout, activation, initialisation, input_dim, input_depth);
|
||||||
network->kernel[0]->activation = activation;
|
|
||||||
add_dense_linearisation(network, 80, activation);
|
add_dense_linearisation(network, 80, activation);
|
||||||
add_dense(network, 10, SOFTMAX);
|
add_dense(network, 10, SOFTMAX);
|
||||||
return network;
|
return network;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
/*
|
/*
|
||||||
* Créé un réseau qui peut contenir max_size couche (dont celle d'input et d'output)
|
* Créé un réseau qui peut contenir max_size couche (dont celle d'input et d'output)
|
||||||
*/
|
*/
|
||||||
Network* create_network(int max_size, float learning_rate, int dropout, int initialisation, int input_dim, int input_depth);
|
Network* create_network(int max_size, float learning_rate, int dropout, int activation, int initialisation, int input_dim, int input_depth);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Renvoie un réseau suivant l'architecture LeNet5
|
* Renvoie un réseau suivant l'architecture LeNet5
|
||||||
|
Loading…
Reference in New Issue
Block a user