forked from lgallet/XOR-NeuralNetwork-C
26 lines
588 B
C
26 lines
588 B
C
//
|
|
// Created by Louis Gallet on 24/09/2024.
|
|
//
|
|
|
|
#ifndef MAIN_H
|
|
#define MAIN_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
|