12345678910111213141516171819202122232425262728 |
- #ifndef NEURONS_H
- #define NEURONS_H
-
- typedef struct weight Weight;
- struct weight
- {
- float value;
- Weight *next;
- };
-
- typedef struct neuron Neuron;
- struct neuron
- {
- Weight *weights; //weights associated to the neuron
- float bias; //neuron's bias
- float output; //output of the neuron
- float (*activation)(float);
- float (*activation_derivative)(float);
- float delta_error; //the delta error for updating current weights
- Neuron *same_layer_next_neuron;
- };
-
-
- Neuron *init_neuron(int n_weights, char *activation_function);
- void destroy_neuron(Neuron *neuron);
-
-
- #endif
|