weitere Verbesserungen
This commit is contained in:
parent
15b4d5d016
commit
8e5c32f197
@ -15,8 +15,8 @@ static void writeWeights(Layer layer, FILE *file)
|
|||||||
|
|
||||||
static void writeBiases(Layer layer, FILE *file)
|
static void writeBiases(Layer layer, FILE *file)
|
||||||
{
|
{
|
||||||
unsigned int n = (unsigned int)layer.weights.rows * layer.weights.cols;
|
unsigned int n = (unsigned int)layer.biases.rows * layer.biases.cols;
|
||||||
fwrite(layer.biases.buffer, sizeof(float ), n, file);
|
fwrite(layer.biases.buffer, sizeof(MatrixType), n, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
||||||
@ -46,7 +46,7 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
|||||||
{
|
{
|
||||||
Layer layer = nn.layers[i];
|
Layer layer = nn.layers[i];
|
||||||
|
|
||||||
int outputDim = (unsigned int)layer.weights.rows;
|
unsigned int outputDim = (unsigned int)layer.weights.rows;
|
||||||
fwrite(&outputDim, sizeof(unsigned int), 1, file);
|
fwrite(&outputDim, sizeof(unsigned int), 1, file);
|
||||||
|
|
||||||
//dimensionen festlegen(weights)
|
//dimensionen festlegen(weights)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user