#include <neural++.hpp>
Public Member Functions | |
Layer (size_t sz, double(*a)(double)) | |
Constructor. | |
Layer (vector< Neuron > &neurons, double(*a)(double)) | |
Alternative constructor. | |
Neuron & | operator[] (size_t i) throw (NetworkIndexOutOfBoundsException) |
Redefinition for operator []. | |
void | link (Layer &l) |
It links a layer to another. | |
void | setProp (vector< double > &v) |
It sets a vector of propagation values to all its neurons. | |
void | setActv (vector< double > &v) |
It sets a vector of activation values to all its neurons. | |
void | propagate () |
It propagates its activation values to the output layers. | |
size_t | size () const |
Private Attributes | |
vector< Neuron > | elements |
void(* | update_weights )() |
double(* | actv_f )(double) |
Don't use this class directly unless you know what you're doing, use NeuralNet instead
neuralpp::Layer::Layer | ( | size_t | sz, | |
double(*)(double) | a | |||
) |
Constructor.
sz | Size of the layer | |
a | Activation function |
neuralpp::Layer::Layer | ( | vector< Neuron > & | neurons, | |
double(*)(double) | a | |||
) |
Alternative constructor.
It directly gets a vector of neurons to build the layer
neurons | Vector of neurons to be included in the layer | |
a | Activation function |
Neuron& neuralpp::Layer::operator[] | ( | size_t | i | ) | throw (NetworkIndexOutOfBoundsException) |
Redefinition for operator [].
It gets the neuron at i
i | Index of the neuron to get in the layer |
void neuralpp::Layer::link | ( | Layer & | l | ) |
void neuralpp::Layer::setProp | ( | vector< double > & | v | ) |
It sets a vector of propagation values to all its neurons.
v | Vector of values to write as propagation values |
void neuralpp::Layer::setActv | ( | vector< double > & | v | ) |
It sets a vector of activation values to all its neurons.
v | Vector of values to write as activation values |
void neuralpp::Layer::propagate | ( | ) |
It propagates its activation values to the output layers.
size_t neuralpp::Layer::size | ( | ) | const |
vector<Neuron> neuralpp::Layer::elements [private] |
void(* neuralpp::Layer::update_weights)() [private] |
double(* neuralpp::Layer::actv_f)(double) [private] |