2022-11-03 17:50:11 +01:00
|
|
|
#include "function.h"
|
2022-11-03 18:13:01 +01:00
|
|
|
#include "struct.h"
|
|
|
|
|
2022-11-03 17:50:11 +01:00
|
|
|
#ifndef DEF_BACKPROPAGATION_H
|
|
|
|
#define DEF_BACKPROPAGATION_H
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Renvoie la valeur minimale entre a et b
|
|
|
|
*/
|
|
|
|
int min(int a, int b);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Renvoie la valeur maximale entre a et b
|
|
|
|
*/
|
|
|
|
int max(int a, int b);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Transfert les informations d'erreur de la sortie voulue à la sortie réelle
|
|
|
|
*/
|
2022-11-25 14:49:21 +01:00
|
|
|
void softmax_backward(float* input, float* input_z, float* output, int size);
|
2022-11-03 17:50:11 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Transfert les informations d'erreur à travers une couche d'average pooling
|
|
|
|
*/
|
|
|
|
void backward_2d_pooling(float*** input, float*** output, int input_width, int output_width, int depth);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Transfert les informations d'erreur à travers une couche fully connected
|
|
|
|
*/
|
2023-02-17 14:56:05 +01:00
|
|
|
void backward_dense(Kernel_nn* ker, float* input, float* input_z, float* output, int size_input, int size_output, ptr d_function, int is_first);
|
2022-11-03 17:50:11 +01:00
|
|
|
|
|
|
|
/*
|
2023-01-17 15:06:39 +01:00
|
|
|
* Transfert les informations d'erreur à travers une couche de linéarisation
|
2022-11-03 17:50:11 +01:00
|
|
|
*/
|
|
|
|
void backward_linearisation(Kernel_nn* ker, float*** input, float*** input_z, float* output, int depth_input, int dim_input, int size_output, ptr d_function);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Transfert les informations d'erreur à travers un couche de convolution
|
|
|
|
*/
|
|
|
|
void backward_convolution(Kernel_cnn* ker, float*** input, float*** input_z, float*** output, int depth_input, int dim_input, int depth_output, int dim_output, ptr d_function, int is_first);
|
|
|
|
|
|
|
|
#endif
|