mirror of
https://github.com/augustin64/projet-tipe
synced 2025-02-09 05:13:43 +01:00
Deletion of a useless parameter in initialisation
This commit is contained in:
parent
7d1729970a
commit
b3a6ecbfec
@ -233,7 +233,7 @@ void add_dense(Network* network, int output_units, int activation) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
initialisation_1d_matrix(network->initialisation, nn->bias, output_units, input_units, output_units);
|
initialisation_1d_matrix(network->initialisation, nn->bias, output_units, input_units);
|
||||||
initialisation_2d_matrix(network->initialisation, nn->weights, input_units, output_units, input_units, output_units);
|
initialisation_2d_matrix(network->initialisation, nn->weights, input_units, output_units, input_units, output_units);
|
||||||
create_a_line_input_layer(network, n, output_units);
|
create_a_line_input_layer(network, n, output_units);
|
||||||
create_a_line_input_z_layer(network, n, output_units);
|
create_a_line_input_z_layer(network, n, output_units);
|
||||||
@ -273,7 +273,7 @@ void add_dense_linearisation(Network* network, int output_units, int activation)
|
|||||||
nn->d_weights[i][j] = 0.;
|
nn->d_weights[i][j] = 0.;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
initialisation_1d_matrix(network->initialisation, nn->bias, output_units, input_units, output_units);
|
initialisation_1d_matrix(network->initialisation, nn->bias, output_units, input_units);
|
||||||
initialisation_2d_matrix(network->initialisation, nn->weights, input_units, output_units, input_units, output_units);
|
initialisation_2d_matrix(network->initialisation, nn->weights, input_units, output_units, input_units, output_units);
|
||||||
create_a_line_input_layer(network, n, output_units);
|
create_a_line_input_layer(network, n, output_units);
|
||||||
create_a_line_input_z_layer(network, n, output_units);
|
create_a_line_input_z_layer(network, n, output_units);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
/*
|
/*
|
||||||
* Initialise une matrice 1d dim de float en fonction du type d'initialisation
|
* Initialise une matrice 1d dim de float en fonction du type d'initialisation
|
||||||
*/
|
*/
|
||||||
void initialisation_1d_matrix(int initialisation, float* matrix, int dim, int n_in, int n_out);
|
void initialisation_1d_matrix(int initialisation, float* matrix, int dim, int n_in);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise une matrice 2d dim1*dim2 de float en fonction du type d'initialisation
|
* Initialise une matrice 2d dim1*dim2 de float en fonction du type d'initialisation
|
||||||
|
@ -9,10 +9,10 @@
|
|||||||
// LeCun initialisation: SELU (1/fan_in)
|
// LeCun initialisation: SELU (1/fan_in)
|
||||||
|
|
||||||
// Only uniform for the moment
|
// Only uniform for the moment
|
||||||
void initialisation_1d_matrix(int initialisation, float* matrix, int dim, int n_in, int n_out) {
|
void initialisation_1d_matrix(int initialisation, float* matrix, int dim, int n_in) {
|
||||||
int n;
|
int n;
|
||||||
if (initialisation == GLOROT) {
|
if (initialisation == GLOROT) {
|
||||||
n = (n_in + n_out)/2;
|
n = (n_in + n)/2;
|
||||||
|
|
||||||
} else if (initialisation == HE) {
|
} else if (initialisation == HE) {
|
||||||
n = n_in/2;
|
n = n_in/2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user