feat: ✨ Create Neural network for XOR
This commit is contained in:
26
main.h
Normal file
26
main.h
Normal file
@ -0,0 +1,26 @@
|
||||
//
|
||||
// Created by Louis Gallet on 24/09/2024.
|
||||
//
|
||||
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
#include <sys/_types/_size_t.h>
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#define NUM_INPUTS 2
|
||||
#define NUM_HIDDEN 2
|
||||
#define NUM_OUTPUTS 1
|
||||
#define NUM_TRAINING_SETS 4
|
||||
|
||||
double sigmoid(double x);
|
||||
double sigmoid_derivative(double x);
|
||||
double init_weights();
|
||||
void shuffle(int *array, size_t n);
|
||||
void backup_weights(char filename[], double hiddenWeights[NUM_INPUTS][NUM_HIDDEN], double hiddenLayerBias[NUM_HIDDEN],
|
||||
double outputWeights[NUM_HIDDEN][NUM_OUTPUTS], double outputLayerBias[NUM_OUTPUTS]);
|
||||
|
||||
|
||||
int main();
|
||||
|
||||
#endif //MAIN_H
|
Reference in New Issue
Block a user