From 4cc74b50f1478029ae0185fc1c8f8c41e67e816f Mon Sep 17 00:00:00 2001 From: Tobias Linz Date: Thu, 12 Nov 2026 10:45:13 +0100 Subject: [PATCH] tweaks --- .gitignore | 1 + Startcode/neuralNetwork.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index a569811..b2f76d7 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,7 @@ Startcode/mnist Startcode/runTests Startcode/runMatrixTests +Startcode/runImageInputTests Startcode/runNeuralNetworkTests # clangd (locally generated, contains absolute paths) diff --git a/Startcode/neuralNetwork.c b/Startcode/neuralNetwork.c index 4d860ba..e324681 100644 --- a/Startcode/neuralNetwork.c +++ b/Startcode/neuralNetwork.c @@ -180,6 +180,9 @@ static void writeDimension(FILE *file, const unsigned int dimension) static void writeMatrix(FILE *file, const Matrix matrix) { + if (matrix.buffer == NULL) + return; + fwrite(matrix.buffer, sizeof(MatrixType), matrix.rows * matrix.cols, file); }