From c7937d63890e4b8e218f094d022110f70668a240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilli=20K=C3=BChnemund?= Date: Fri, 6 Nov 2026 21:56:34 +0100 Subject: [PATCH] Fehler ausbessern --- Startcode/neuralNetwork.c | 2 +- Startcode/neuralNetworkTests.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Startcode/neuralNetwork.c b/Startcode/neuralNetwork.c index bd8f164..30e6e4f 100644 --- a/Startcode/neuralNetwork.c +++ b/Startcode/neuralNetwork.c @@ -170,7 +170,7 @@ NeuralNetwork loadModel(const char *path) static Matrix imageBatchToMatrixOfImageVectors(const GrayScaleImage images[], unsigned int count) { - Matrix matrix = {NULL, 0, 0}; + Matrix matrix = {0, 0, NULL}; if(count > 0 && images != NULL) { diff --git a/Startcode/neuralNetworkTests.c b/Startcode/neuralNetworkTests.c index bd6f0ed..771f977 100644 --- a/Startcode/neuralNetworkTests.c +++ b/Startcode/neuralNetworkTests.c @@ -10,7 +10,7 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn) { // TODO // 1. Datei Öffnen - FILE *file = fopen(path, "wb") + FILE *file = fopen(path, "wb"); // überprüfen ob das öffnen funktioniert hat if (file == NULL) @@ -43,7 +43,7 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn) file ); - //Bias-Matrix + //Bias-Matrix des aktuellen Layers in die Datei speichern fwrite ( layer->biases.buffer, @@ -52,7 +52,7 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn) file ); - // + //ermitteln wie viele Ausgabewerte der nächste Layer haben wird if (i + 1 < nn.numberOfLayers) { outputDimension = nn.layers[i + 1].weights.rows;