No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

neurons.h 591B

12345678910111213141516171819202122232425262728
  1. #ifndef NEURONS_H
  2. #define NEURONS_H
  3. typedef struct weight Weight;
  4. struct weight
  5. {
  6. float value;
  7. Weight *next;
  8. };
  9. typedef struct neuron Neuron;
  10. struct neuron
  11. {
  12. Weight *weights; //weights associated to the neuron
  13. float bias; //neuron's bias
  14. float output; //output of the neuron
  15. float (*activation)(float);
  16. float (*activation_derivative)(float);
  17. float delta_error; //the delta error for updating current weights
  18. Neuron *same_layer_next_neuron;
  19. };
  20. Neuron *init_neuron(int n_weights, char *activation_function);
  21. void destroy_neuron(Neuron *neuron);
  22. #endif