debug build

This commit is contained in:
Jakob Stornig 2023-09-19 11:19:56 +02:00
parent f98bb5cbaa
commit 52d97f3c54
3 changed files with 5 additions and 6 deletions

View file

@ -1,5 +1,3 @@
#pragma once
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -16,7 +14,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb
if(image_file == NULL || label_file == NULL) { if(image_file == NULL || label_file == NULL) {
printf("ERROR: File could not be opened! (import_images)"); printf("ERROR: File could not be opened! (import_images)");
} }
char ch;
do { do {
ch = fgetc(label_file); ch = fgetc(label_file);
printf("%c", ch); printf("%c", ch);
@ -33,7 +31,7 @@ Image** import_images(char* image_file_string, char* label_file_string, int numb
fclose(label_file); fclose(label_file);
} }
void img_print (Img* img) { void img_print (Image* img) {
//print the image //print the image
matrix_print(img->pixel_values); matrix_print(img->pixel_values);
@ -42,6 +40,6 @@ void img_print (Img* img) {
printf("%d", img->image_label); printf("%d", img->image_label);
} }
void img_free (Img* img) { void img_free (Image* img) {
} }

View file

@ -1,4 +1,5 @@
#pragma once #pragma once
#include "matrix.h"
typedef struct { typedef struct {
Matrix* pixel_values; Matrix* pixel_values;

View file

@ -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]; else if (axis == 1) result_matrix->numbers[0][i * matrix->columns + j] = matrix->numbers[i][j];
} }
} }
return mat; return result_matrix;
} }