24 lines
457 B
C
24 lines
457 B
C
#ifndef NEURAL_H
|
|
#define NEURAL_H
|
|
|
|
typedef struct _neuron {
|
|
float value;
|
|
float threshold;
|
|
float **in_values;
|
|
float *weights;
|
|
ssize_t in_values_size;
|
|
} Neuron;
|
|
|
|
typedef struct _neural_network {
|
|
Neuron *n;
|
|
ssize_t layer_size; // Neurons Per Layer
|
|
ssize_t layers;
|
|
} Neural_Network;
|
|
|
|
Neural_Network *neural_new(size_t, size_t);
|
|
void neural_randomize(Neural_Network *);
|
|
float *neural_process(Neural_Network *, float *);
|
|
|
|
#endif
|
|
|
|
|