mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
Update train.c
This commit is contained in:
parent
80e82c16f6
commit
c913bf3195
@ -219,7 +219,10 @@ void train(int dataset_type, char* images_file, char* labels_file, char* data_di
|
||||
// On attend la terminaison de chaque thread un à un
|
||||
pthread_join( tid[k], NULL );
|
||||
accuracy += train_parameters[k]->accuracy / (float) nb_images_total;
|
||||
}
|
||||
|
||||
// On attend que tous les fils aient fini avant d'appliquer des modifications au réseau principal
|
||||
for (int k=0; k < nb_threads; k++) {
|
||||
update_weights(network, train_parameters[k]->network, train_parameters[k]->nb_images);
|
||||
update_bias(network, train_parameters[k]->network, train_parameters[k]->nb_images);
|
||||
free_network(train_parameters[k]->network);
|
||||
|
Loading…
Reference in New Issue
Block a user