2022-10-05 11:20:26 +02:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
2022-10-24 12:54:51 +02:00
|
|
|
#include "../src/include/colors.h"
|
|
|
|
#include "../src/cnn/include/creation.h"
|
|
|
|
#include "../src/cnn/include/utils.h"
|
2022-11-23 10:41:19 +01:00
|
|
|
#include "../src/cnn/include/free.h"
|
2022-11-11 11:20:30 +01:00
|
|
|
#include "../src/include/colors.h"
|
2022-10-05 11:20:26 +02:00
|
|
|
|
|
|
|
int main() {
|
|
|
|
printf("Création du réseau\n");
|
|
|
|
Network* network = create_network_lenet5(0, 0, 3, 2, 32, 1);
|
2022-11-11 11:20:30 +01:00
|
|
|
printf(GREEN "OK\n" RESET);
|
2022-10-05 11:20:26 +02:00
|
|
|
|
|
|
|
printf("Copie du réseau\n");
|
|
|
|
Network* network_cp = copy_network(network);
|
2022-11-11 11:20:30 +01:00
|
|
|
printf(GREEN "OK\n" RESET);
|
2022-10-05 11:20:26 +02:00
|
|
|
|
|
|
|
printf("Vérification de l'égalité des réseaux\n");
|
|
|
|
if (! equals_networks(network, network_cp)) {
|
2022-11-11 11:20:30 +01:00
|
|
|
printf_error(RED "Les deux réseaux obtenus ne sont pas égaux.\n" RESET);
|
2022-10-05 11:20:26 +02:00
|
|
|
exit(1);
|
|
|
|
}
|
2022-11-11 11:20:30 +01:00
|
|
|
printf(GREEN "OK\n" RESET);
|
2022-10-05 11:20:26 +02:00
|
|
|
|
2022-11-23 10:41:19 +01:00
|
|
|
free_network(network_cp);
|
|
|
|
free_network(network);
|
2022-10-05 11:20:26 +02:00
|
|
|
return 0;
|
|
|
|
}
|