mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
Update main.c
This commit is contained in:
parent
fd7fe39e14
commit
daaef0971b
@ -222,7 +222,7 @@ void test(char* modele, char* fichier_images, char* fichier_labels, bool preview
|
|||||||
for (int i=0; i < nb_images; i++) {
|
for (int i=0; i < nb_images; i++) {
|
||||||
if (indice_max(resultats[i], nb_der_layer) == labels[i]) {
|
if (indice_max(resultats[i], nb_der_layer) == labels[i]) {
|
||||||
accuracy += 1. / (float)nb_images;
|
accuracy += 1. / (float)nb_images;
|
||||||
} else {
|
} else if (preview_fails) {
|
||||||
printf("--- Image %d, %d --- Prévision: %d ---\n", i, labels[i], indice_max(resultats[i], nb_der_layer));
|
printf("--- Image %d, %d --- Prévision: %d ---\n", i, labels[i], indice_max(resultats[i], nb_der_layer));
|
||||||
print_image(width, height, images[i], resultats[i]);
|
print_image(width, height, images[i], resultats[i]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user