From 52d97f3c54ba937a79bab3b1b14404aed3e9fb72 Mon Sep 17 00:00:00 2001 From: Jakob Stornig Date: Tue, 19 Sep 2023 11:19:56 +0200 Subject: [PATCH] debug build --- image.c | 8 +++----- image.h | 1 + matrix.c | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/image.c b/image.c index e0af441..a35f1b5 100644 --- a/image.c +++ b/image.c @@ -1,5 +1,3 @@ -#pragma once - #include #include @@ -16,7 +14,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb if(image_file == NULL || label_file == NULL) { printf("ERROR: File could not be opened! (import_images)"); } - + char ch; do { ch = fgetc(label_file); printf("%c", ch); @@ -33,7 +31,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb fclose(label_file); } -void img_print (Img* img) { +void img_print (Image* img) { //print the image matrix_print(img->pixel_values); @@ -42,6 +40,6 @@ void img_print (Img* img) { printf("%d", img->image_label); } -void img_free (Img* img) { +void img_free (Image* img) { } diff --git a/image.h b/image.h index 9bbf257..ee252c7 100644 --- a/image.h +++ b/image.h @@ -1,4 +1,5 @@ #pragma once +#include "matrix.h" typedef struct { Matrix* pixel_values; diff --git a/matrix.c b/matrix.c index 7954e59..b229631 100644 --- a/matrix.c +++ b/matrix.c @@ -265,5 +265,5 @@ Matrix* matrix_flatten(Matrix* matrix, int axis) { else if (axis == 1) result_matrix->numbers[0][i * matrix->columns + j] = matrix->numbers[i][j]; } } - return mat; + return result_matrix; }