tipe/src/cnn/main.h

37 lines
794 B
C
Raw Normal View History

2022-07-05 08:13:25 +02:00
#include "struct.h"
2022-06-30 10:27:42 +02:00
2022-09-12 17:56:44 +02:00
#ifndef DEF_MAIN_H
#define DEF_MAIN_H
2022-06-30 10:27:42 +02:00
2022-07-05 08:13:25 +02:00
/*
* Renvoie si oui ou non (1 ou 0) le neurone va être abandonné
*/
2022-06-30 10:27:42 +02:00
int will_be_drop(int dropout_prob);
2022-07-05 08:13:25 +02:00
/*
* Écrit une image 28*28 au centre d'un tableau 32*32 et met à 0 le reste
2022-07-05 08:13:25 +02:00
*/
void write_image_in_network_32(int** image, int height, int width, float** input);
2022-07-05 08:13:25 +02:00
/*
* Propage en avant le cnn
*/
2022-06-30 10:27:42 +02:00
void forward_propagation(Network* network);
2022-07-05 08:13:25 +02:00
/*
* Propage en arrière le cnn
*/
2022-06-30 10:27:42 +02:00
void backward_propagation(Network* network, float wanted_number); //NOT FINISHED
2022-07-05 08:13:25 +02:00
/*
* Renvoie l'erreur du réseau neuronal pour une sortie
*/
2022-06-30 10:27:42 +02:00
float compute_cross_entropy_loss(float* output, float* wanted_output, int len);
2022-07-05 08:13:25 +02:00
/*
* On considère que la sortie voulue comporte 10 éléments
*/
float* generate_wanted_output(float wanted_number);
2022-06-30 10:27:42 +02:00
#endif