tipe/src/mnist/include/neural_network.h

34 lines
1.1 KiB
C
Raw Normal View History

2022-04-01 15:41:54 +02:00
#include <stdio.h>
#include <stdlib.h>
2022-04-25 10:29:36 +02:00
#include <stdint.h>
2022-04-01 15:41:54 +02:00
#include <string.h>
#include <math.h>
#include <time.h>
2022-04-26 11:39:29 +02:00
#include "neuron.h"
2022-04-01 15:41:54 +02:00
#ifndef DEF_NEURAL_NETWORK_H
#define DEF_NEURAL_NETWORK_H
2022-04-05 09:08:39 +02:00
float max(float a, float b);
float sigmoid(float x);
2022-04-25 14:39:45 +02:00
float sigmoid_derivative(float x);
2022-04-18 17:49:50 +02:00
float leaky_ReLU(float x);
2022-04-25 14:39:45 +02:00
float leaky_ReLU_derivative(float x);
2022-05-14 10:28:40 +02:00
void network_creation(Network* network, int* neurons_per_layer, int nb_layers);
void deletion_of_network(Network* network);
void forward_propagation(Network* network);
int* desired_output_creation(Network* network, int wanted_number);
void backward_propagation(Network* network, int* desired_output);
void network_modification(Network* network, uint32_t nb_modifs);
void network_initialisation(Network* network);
void patch_network(Network* network, Network* delta, uint32_t nb_modifs);
2022-05-19 22:26:19 +02:00
void patch_delta(Network* network, Network* delta, uint32_t nb_modifs);
2022-05-14 10:28:40 +02:00
Network* copy_network(Network* network);
2022-04-25 14:39:45 +02:00
float loss_computing(Network* network, int numero_voulu);
2022-04-01 15:41:54 +02:00
2022-06-01 17:14:16 +02:00
#ifdef __CUDACC__
Network* copy_network_cuda(Network* network);
#endif
2022-04-01 15:41:54 +02:00
#endif