mirror of
https://github.com/augustin64/projet-tipe
synced 2025-02-02 19:39:39 +01:00
Update test/cnn_utils.c
This commit is contained in:
parent
7b02a0e8fd
commit
1c83c03bc6
@ -10,9 +10,10 @@
|
||||
int main() {
|
||||
printf("Création du réseau\n");
|
||||
Network* network = create_network_lenet5(0, 0, 3, 2, 32, 1);
|
||||
Network* network2 = create_network_lenet5(0, 0, 3, 2, 32, 1);
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
printf("Copie du réseau\n");
|
||||
printf("Copie du réseau via copy_network\n");
|
||||
Network* network_cp = copy_network(network);
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
@ -23,7 +24,19 @@ int main() {
|
||||
}
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
printf("Copie du réseau via copy_network_parameters\n");
|
||||
copy_network_parameters(network, network2);
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
printf("Vérification de l'égalité des réseaux\n");
|
||||
if (! equals_networks(network, network2)) {
|
||||
printf_error(RED "Les deux réseaux obtenus ne sont pas égaux.\n" RESET);
|
||||
exit(1);
|
||||
}
|
||||
printf(GREEN "OK\n" RESET);
|
||||
|
||||
free_network(network_cp);
|
||||
free_network(network2);
|
||||
free_network(network);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user