20 #ifndef SUPERNN_NEURON_HPP
21 #define SUPERNN_NEURON_HPP
24 #include "activation_type.hpp"
122 void connect(
unsigned to_layer,
unsigned to_neuron);
Neuron, that can contain connections to neurons in the next layers.
std::vector< Connection > conns
Synaptic connections.
double aux2
Auxiliary storage 2, used by some training algorithms.
Synaptic connection between two neurons.
void set_activation(ActFuncType type, double s=1)
Sets the neuron activation function.
bool delta_ok
Marks if the delta has been calculated for the current iteration.
Neuron(bool _b=false)
Constructor.
double aux1
Auxiliary storage 1, used by some training algorithms.
double steep
Activation function steepness.
void connect(unsigned to_layer, unsigned to_neuron)
Adds a connection to a neuron.
double out
Last output of the neuron ( g(net) )
double rand_double(double max)
Returns a pseudo-random double.
Connection & operator[](unsigned c)
Returns a reference to a connection.
double delta
Last local error gradient.
const Connection & operator[](unsigned c) const
Returns a const reference to a connection.
unsigned size() const
Returns the number of synaptic connections.
ActFuncType act_func
Used activation function.
double err
Last error (desired - actual).
unsigned to_neuron
Position of the target neuron in it's layer.
ActFuncType
Activation functions built-in in the library.
unsigned to_layer
Layer where the target neuron is located.
double net
Last sum of the neuron inputs.
bool bias
Marks if it's a bias neuron.
double derror
Accumulated partial error derivative in respect to the connection weight.