diff --git a/src/cnn/include/initialisation.h b/src/cnn/include/initialisation.h index 20dd38a..6a1f57a 100644 --- a/src/cnn/include/initialisation.h +++ b/src/cnn/include/initialisation.h @@ -3,7 +3,6 @@ // Génère un flottant entre 0 et 1 #define RAND_FLT() ((float)rand())/((float)RAND_MAX) -#define TWOPI 6.2831853071795864769252867665 #define ZERO 0 #define GLOROT 1 diff --git a/src/cnn/initialisation.c b/src/cnn/initialisation.c index e7efa4d..b938548 100644 --- a/src/cnn/initialisation.c +++ b/src/cnn/initialisation.c @@ -15,7 +15,7 @@ float randn() { while (f1 == 0) { f1 = RAND_FLT(); } - return sqrt(-2.0*log(f1))*cos(TWOPI*RAND_FLT()); + return sqrt(-2.0*log(f1))*cos(2*M_PI*RAND_FLT()); } void initialisation_1d_matrix(int initialisation, float* matrix, int dim, int n_in, int n_out) {