From 563b8dc1a3a30f3f4476aef383946aeb787d9565 Mon Sep 17 00:00:00 2001 From: Julien Chemillier Date: Tue, 3 May 2022 09:56:05 +0200 Subject: [PATCH] Suppression of a define --- src/mnist/main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mnist/main.c b/src/mnist/main.c index c2a9049..2c4fdca 100644 --- a/src/mnist/main.c +++ b/src/mnist/main.c @@ -10,8 +10,6 @@ #define EPOCHS 100 #define BATCHES 100 -#define IS_LEARNING true - void print_image(unsigned int width, unsigned int height, int** image, float* previsions) { char tab[] = {' ', '.', ':', '%', '#', '\0'}; @@ -132,12 +130,12 @@ void train(int batches, int layers, int neurons, char* recovery, char* image_fil loss += loss_computing(network, labels[j]) / (float)nb_images; free(desired_output); - if (j%BATCHES==BATCHES-1 && IS_LEARNING) + if (j%BATCHES==BATCHES-1) network_modification(network, BATCHES); } - if (nb_images%BATCHES != 0 && IS_LEARNING) + if (nb_images%BATCHES != 0) network_modification(network, nb_images%BATCHES); printf("\rBatch [%d/%d]\tImage [%d/%d]\tAccuracy: %0.1f%%\tLoss: %f\n",i, batches, nb_images, nb_images, accuracy*100, loss);