forked from freudenreichan/info2Praktikum-NeuronalesNetz
Fehler ausbessern
This commit is contained in:
1 parent
171dbee748
commit
c7937d6389
2 files changed
+4
-4
No files matched your search
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user