initiate Neuronales_Netz
This commit is contained in:
1 parent
284cc80e9f
commit
37caf9a24e
19 files changed
+415
-8
No files matched your search
@@ -80,7 +80,6 @@ static Matrix readMatrix(FILE *file, unsigned int rows, unsigned int cols)
|
||||
if(fread(matrix.buffer, sizeof(MatrixType), rows*cols, file) != rows*cols)
|
||||
clearMatrix(&matrix);
|
||||
}
|
||||
|
||||
return matrix;
|
||||
}
|
||||
|
||||
@@ -146,13 +145,16 @@ NeuralNetwork loadModel(const char *path)
|
||||
layerBuffer = (Layer *)realloc(model.layers, (model.numberOfLayers + 1) * sizeof(Layer));
|
||||
|
||||
if(layerBuffer != NULL)
|
||||
{
|
||||
model.layers = layerBuffer;
|
||||
}
|
||||
else
|
||||
{
|
||||
clearModel(&model);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
model.layers[model.numberOfLayers] = layer;
|
||||
model.numberOfLayers++;
|
||||
|
||||
|
||||
Reference in new issue
Block a user