From e1617a72a8df103c3a0263c10a8bfabb96bfd770 Mon Sep 17 00:00:00 2001 From: augustin64 Date: Tue, 16 May 2023 11:49:46 +0200 Subject: [PATCH] cnn: Remove warnings --- src/cnn/free.c | 1 + src/cnn/test_network.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/cnn/free.c b/src/cnn/free.c index 0b780d4..09bae9e 100644 --- a/src/cnn/free.c +++ b/src/cnn/free.c @@ -181,6 +181,7 @@ void free_network(Network* network) { // et que cela soit le cas UNIQUEMENT pour la mémoire allouée au réseau // Représente un gain de 45mn sur VGG16 + (void)network; free_all_memory(); #else for (int i=network->size-2; i>=0; i--) { diff --git a/src/cnn/test_network.c b/src/cnn/test_network.c index 2f1605f..9bbd0bd 100644 --- a/src/cnn/test_network.c +++ b/src/cnn/test_network.c @@ -1,7 +1,8 @@ +#include +#include +#include #include #include -#include -#include #include "../common/include/memory_management.h" #include "../common/include/mnist.h" @@ -183,12 +184,13 @@ void recognize_mnist(Network* network, char* input_file, char* out) { } void recognize_jpg(Network* network, char* input_file, char* out) { - int width, height; // Dimensions de l'image + int width; // Dimensions de l'image, qui doit être carrée int maxi; imgRawImage* image = loadJpegImageFile(input_file); width = image->width; - height = image->height; + + assert(image->width == image->height); if (! strcmp(out, "json")) { printf("{\n");