mirror of
https://github.com/augustin64/projet-tipe
synced 2025-03-14 06:45:22 +01:00
Fix parallel
This commit is contained in:
parent
ed47283f5a
commit
4940807da3
@ -204,9 +204,9 @@ void train(int epochs, int layers, int neurons, char* recovery, char* image_file
|
|||||||
for(int j=0; j < nb_threads; j++ ) {
|
for(int j=0; j < nb_threads; j++ ) {
|
||||||
pthread_join( tid[j], NULL );
|
pthread_join( tid[j], NULL );
|
||||||
accuracy += train_parameters[j]->accuracy / (float) nb_images_total;
|
accuracy += train_parameters[j]->accuracy / (float) nb_images_total;
|
||||||
patch_network(network, train_parameters[j]->network, train_parameters[j]->nb_images);
|
|
||||||
if (delta != NULL)
|
if (delta != NULL)
|
||||||
patch_delta(delta_network, train_parameters[j]->network, train_parameters[j]->nb_images);
|
patch_delta(delta_network, train_parameters[j]->network, train_parameters[j]->nb_images);
|
||||||
|
patch_network(network, train_parameters[j]->network, train_parameters[j]->nb_images);
|
||||||
deletion_of_network(train_parameters[j]->network);
|
deletion_of_network(train_parameters[j]->network);
|
||||||
free(train_parameters[j]);
|
free(train_parameters[j]);
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ def authenticate():
|
|||||||
data["nb_elem"] = 0
|
data["nb_elem"] = 0
|
||||||
data["start"] = 0
|
data["start"] = 0
|
||||||
data["instruction"] = "sleep"
|
data["instruction"] = "sleep"
|
||||||
data["sleep_time"] = 1
|
data["sleep_time"] = 0.2
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
@ -132,7 +132,7 @@ def post_network():
|
|||||||
data["nb_elem"] = 0
|
data["nb_elem"] = 0
|
||||||
data["start"] = 0
|
data["start"] = 0
|
||||||
data["instruction"] = "sleep"
|
data["instruction"] = "sleep"
|
||||||
data["sleep_time"] = 1
|
data["sleep_time"] = 0.2
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user