fixed some typos
This commit is contained in:
parent
c04202725b
commit
f2dc978764
@ -9,7 +9,7 @@
|
|||||||
static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
||||||
{
|
{
|
||||||
FILE *file = fopen(path, "wb");
|
FILE *file = fopen(path, "wb");
|
||||||
if (!fiile)
|
if (!file)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -36,14 +36,14 @@ static void prepareNeuralNetworkFile(const char *path, const NeuralNetwork nn)
|
|||||||
for (int i = 0; i < nn.numberOfLayers; i++)
|
for (int i = 0; i < nn.numberOfLayers; i++)
|
||||||
{
|
{
|
||||||
//const Layerlayer = &nn.layers[i];
|
//const Layerlayer = &nn.layers[i];
|
||||||
int out = layer->weights.rows;
|
int out = layers->weights.rows;
|
||||||
int in = layer->weights.cols;
|
int in = layers->weights.cols;
|
||||||
|
|
||||||
|
|
||||||
fwrite(layer->weights.buffer, sizeof(MatrixType), out * in, file);
|
fwrite(layers->weights.buffer, sizeof(MatrixType), out * in, file);
|
||||||
|
|
||||||
|
|
||||||
fwrite(layer->biases.buffer, sizeof(MatrixType), out * 1, file);
|
fwrite(layers->biases.buffer, sizeof(MatrixType), out * 1, file);
|
||||||
|
|
||||||
if (i + 1 < nn.numberOfLayers)
|
if (i + 1 < nn.numberOfLayers)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user