diff options
author | jvech <jmvalenciae@unal.edu.co> | 2023-09-03 16:41:17 -0500 |
---|---|---|
committer | jvech <jmvalenciae@unal.edu.co> | 2023-09-03 16:41:17 -0500 |
commit | bab6d665d98668f67686a3085d7de46204f67366 (patch) | |
tree | ecddf424a25319f4e60509f010284637fd3a3c00 /src/nn.c | |
parent | ed930338f7936630705c665cad9dd6d562344efc (diff) |
fix: write network parameter fixed
Diffstat (limited to 'src/nn.c')
-rw-r--r-- | src/nn.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -306,6 +306,7 @@ void nn_network_read_weights(char *filepath, Layer *network, size_t network_size if (ret != shape[1]) goto nn_network_read_weights_error; } + fclose(fp); return; nn_network_read_weights_error: @@ -331,7 +332,7 @@ void nn_network_write_weights(char *filepath, Layer *network, size_t network_siz ret = fwrite(network[i].weights, sizeof(double), size, fp); if (ret != size) goto nn_network_write_weights_error; - ret = fwrite(network[i].weights, sizeof(double), network[i].neurons, fp); + ret = fwrite(network[i].bias, sizeof(double), network[i].neurons, fp); if (ret != network[i].neurons) goto nn_network_write_weights_error; } fclose(fp); |