NeuralNetIterator Class Reference

This class iterate over the neurons of a NNFW neural network. More...

Inheritance diagram for NeuralNetIterator:

Public Member Functions

 NeuralNetIterator ()
 Constructor. More...
 
virtual ~NeuralNetIterator ()
 Destructor. More...
 
double getInput ()
 Get the input of the current neuron. More...
 
double getOutput ()
 Get the output of the current neuron. More...
 
bool nextNeuron ()
 Go to the next neuron of the current block. More...
 
bool setCurrentBlock (QString blockName)
 Set the current blocks (Cluster) of neurons to iterate. More...
 
void setGraphicProperties (QString label, double minValue, double maxValue, QColor color)
 Set the graphic properties for the current neuron (in case it will be visualized on a GUI) More...
 
void setInput (double value)
 Set the input of the current neuron. More...
 
void setNeuralNet (farsa::NeuralNet *neuralnet)
 Set the NeuralNet on which iterate. More...
 
- Public Member Functions inherited from NeuronsIterator
virtual ~NeuronsIterator ()
 Destructor. More...
 

Additional Inherited Members

- Public Types inherited from Resource
enum  ResourceChangeType
 

Detailed Description

This class iterate over the neurons of a NNFW neural network.

The blocks are identified by the name of the Cluster

Definition at line 37 of file neuralnetiterator.h.

Constructor & Destructor Documentation

Constructor.

Definition at line 28 of file neuralnetiterator.cpp.

~NeuralNetIterator ( )
virtual

Destructor.

Definition at line 34 of file neuralnetiterator.cpp.

Member Function Documentation

double getInput ( )
virtual

Get the input of the current neuron.

Implements NeuronsIterator.

Definition at line 71 of file neuralnetiterator.cpp.

double getOutput ( )
virtual

Get the output of the current neuron.

Implements NeuronsIterator.

Definition at line 77 of file neuralnetiterator.cpp.

bool nextNeuron ( )
virtual

Go to the next neuron of the current block.

Returns
true if a next neuron exist and set it as current neuron; false when it has been reached the end of current block
Note
if you need to go back at the beginning, use setCurrentBlock again

Implements NeuronsIterator.

Definition at line 55 of file neuralnetiterator.cpp.

bool setCurrentBlock ( QString  blockName)
virtual

Set the current blocks (Cluster) of neurons to iterate.

You need to first call this method for iterate over neurons.

Parameters
blockNameis the name given to the Cluster on which iterate
Returns
true if the current block is now the block defined with name blockName; false otherwise

Implements NeuronsIterator.

Definition at line 44 of file neuralnetiterator.cpp.

References Logger::error().

void setGraphicProperties ( QString  label,
double  minValue,
double  maxValue,
QColor  color 
)
virtual

Set the graphic properties for the current neuron (in case it will be visualized on a GUI)

Parameters
labelis the name to show on the GUI corresponding to current neuron
minValueis the min value for the current neuron (for the GUI visualizing the activation value)
maxValueis the max value for the current neuron (for the GUI visualizing the activation value)
coloris the color on which the above data will be displayed on the GUIs

Implements NeuronsIterator.

Definition at line 82 of file neuralnetiterator.cpp.

References Logger::warning().

void setInput ( double  value)
virtual

Set the input of the current neuron.

Implements NeuronsIterator.

Definition at line 65 of file neuralnetiterator.cpp.

void setNeuralNet ( farsa::NeuralNet *  neuralnet)

Set the NeuralNet on which iterate.

Definition at line 38 of file neuralnetiterator.cpp.


The documentation for this class was generated from the following files: