tipe/src/cnn/include/train.h

43 lines
880 B
C
Raw Normal View History

2022-10-04 12:43:37 +02:00
#include "struct.h"
2022-10-01 17:53:14 +02:00
#ifndef DEF_TRAIN_H
#define DEF_TRAIN_H
#define EPOCHS 10
#define BATCHES 100
#define USE_MULTITHREADING
/*
* Structure donnée en argument à la fonction 'train_thread'
*/
typedef struct TrainParameters {
Network* network;
int*** images;
unsigned int* labels;
int width;
int height;
int dataset_type;
char* data_dir;
int start;
int nb_images;
float accuracy;
} TrainParameters;
2022-11-03 18:13:01 +01:00
/*
* Renvoie l'indice maximal d'un tableau tab de taille n
*/
int indice_max(float* tab, int n);
2022-10-01 17:53:14 +02:00
/*
* Fonction auxiliaire d'entraînement destinée à être exécutée sur plusieurs threads à la fois
*/
void* train_thread(void* parameters);
/*
* Fonction principale d'entraînement du réseau neuronal convolutif
*/
void train(int dataset_type, char* images_file, char* labels_file, char* data_dir, int epochs, char* out);
#endif