diff --git a/test/cnn_utils.c b/test/cnn_utils.c index 2bc7c04..2ba3fae 100644 --- a/test/cnn_utils.c +++ b/test/cnn_utils.c @@ -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; } \ No newline at end of file