load network

This commit is contained in:
Thomas Schleicher 2023-09-21 09:56:10 +02:00
parent 2654733c27
commit d9b6e342c0
5 changed files with 24 additions and 27 deletions

View file

@ -112,8 +112,16 @@ Neural_Network* load_network(char* file) {
// create a new network to fill with the saved data
Neural_Network* saved_network = new_network(input_size, hidden_size, output_size, 0);
// load matrices from file into struct
saved_network->bias_1 = load_next_matrix(save_file);
saved_network->weights_1 = load_next_matrix(save_file);
saved_network->bias_2 = load_next_matrix(save_file);
saved_network->weights_2 = load_next_matrix(save_file);
saved_network->bias_3 = load_next_matrix(save_file);
saved_network->weights_3 = load_next_matrix(save_file);
saved_network->weights_output = load_next_matrix(save_file);
// return saved network
return saved_network;
}