generated from freudenreichan/info2Praktikum-NeuronalesNetz
neuralNetworkTests v2
This commit is contained in:
parent
c1b20e632b
commit
e4ba70f5da
@ -170,7 +170,7 @@ NeuralNetwork loadModel(const char *path)
|
|||||||
|
|
||||||
static Matrix imageBatchToMatrixOfImageVectors(const GrayScaleImage images[], unsigned int count)
|
static Matrix imageBatchToMatrixOfImageVectors(const GrayScaleImage images[], unsigned int count)
|
||||||
{
|
{
|
||||||
Matrix matrix = {NULL, 0, 0};
|
Matrix matrix = {0, 0, NULL}; //{NULL, 0, 0} -> fehler
|
||||||
|
|
||||||
if(count > 0 && images != NULL)
|
if(count > 0 && images != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,7 +26,7 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
|||||||
fwrite(nn.layers[i].weights.buffer, sizeof(MatrixType), numWeights, file);
|
fwrite(nn.layers[i].weights.buffer, sizeof(MatrixType), numWeights, file);
|
||||||
|
|
||||||
unsigned int numBiases = nn.layers[i].biases.rows * nn.layers[i].biases.cols;
|
unsigned int numBiases = nn.layers[i].biases.rows * nn.layers[i].biases.cols;
|
||||||
fwrite(nn.layers[i].biases.buffer, sizeof(MatrixType), 1, file);
|
fwrite(nn.layers[i].biases.buffer, sizeof(MatrixType), numBiases, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int outputDimension = 0;
|
unsigned int outputDimension = 0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user