iCub-main
Public Member Functions | List of all members
iCub::ctrl::ff2LayNN_tansig_purelin Class Reference

Feed-Forward 2 layers Neural Network with a tansig function for the hidden nodes and a purelin for the output nodes. More...

#include <neuralNetworks.h>

+ Inheritance diagram for iCub::ctrl::ff2LayNN_tansig_purelin:

Public Member Functions

 ff2LayNN_tansig_purelin ()
 Create an empty network. More...
 
 ff2LayNN_tansig_purelin (const yarp::os::Property &options)
 Create and configure the network. More...
 
virtual yarp::sig::Vector hiddenLayerFcn (const yarp::sig::Vector &x) const
 Hidden Layer Function. More...
 
virtual yarp::sig::Vector outputLayerFcn (const yarp::sig::Vector &x) const
 Output Layer Function. More...
 
virtual yarp::sig::Vector hiddenLayerGrad (const yarp::sig::Vector &x) const
 Gradient of the Hidden Layer Function. More...
 
virtual yarp::sig::Vector outputLayerGrad (const yarp::sig::Vector &x) const
 Gradient of the Output Layer Function. More...
 
- Public Member Functions inherited from iCub::ctrl::ff2LayNN
 ff2LayNN ()
 Create an empty network. More...
 
 ff2LayNN (const yarp::os::Property &options)
 Create and configure the network. More...
 
virtual bool configure (const yarp::os::Property &options)
 Configure/reconfigure the network. More...
 
virtual bool isValid () const
 Return the internal status after a configuration. More...
 
virtual yarp::sig::Vector predict (const yarp::sig::Vector &x) const
 Predict the output given a certain input to the network. More...
 
virtual bool getStructure (yarp::os::Property &options) const
 Retrieve the network structure as a Property object. More...
 
virtual bool printStructure (std::ostream &stream=std::cout) const
 Dump tadily the network structure on the stream. More...
 
std::deque< yarp::sig::Vector > & get_IW ()
 Retrieve first layer weights. More...
 
std::deque< yarp::sig::Vector > & get_LW ()
 Retrieve second layer weights. More...
 
yarp::sig::Vector & get_b1 ()
 Retrieve first layer bias. More...
 
yarp::sig::Vector & get_b2 ()
 Retrieve second layer bias. More...
 
virtual yarp::sig::Vector scaleInputToNetFormat (const yarp::sig::Vector &x) const
 Scale input to be used with the network. More...
 
virtual yarp::sig::Vector scaleInputFromNetFormat (const yarp::sig::Vector &x) const
 Scale back input from the network's format. More...
 
virtual yarp::sig::Vector scaleOutputToNetFormat (const yarp::sig::Vector &x) const
 Scale output to be used with the network. More...
 
virtual yarp::sig::Vector scaleOutputFromNetFormat (const yarp::sig::Vector &x) const
 Scale back output from the network's format. More...
 

Additional Inherited Members

- Protected Member Functions inherited from iCub::ctrl::ff2LayNN
void prepare ()
 
void setItem (yarp::os::Property &options, const std::string &tag, const yarp::sig::Vector &item) const
 
bool getItem (const yarp::os::Property &options, const std::string &tag, yarp::sig::Vector &item) const
 
- Protected Attributes inherited from iCub::ctrl::ff2LayNN
std::deque< yarp::sig::Vector > IW
 
yarp::sig::Vector b1
 
std::deque< yarp::sig::Vector > LW
 
yarp::sig::Vector b2
 
std::deque< minmaxinMinMaxX
 
std::deque< minmaxinMinMaxY
 
std::deque< minmaxoutMinMaxX
 
std::deque< minmaxoutMinMaxY
 
yarp::sig::Vector inMinX
 
yarp::sig::Vector inMinY
 
yarp::sig::Vector inRatio
 
yarp::sig::Vector outMinX
 
yarp::sig::Vector outMinY
 
yarp::sig::Vector outRatio
 
bool configured
 

Detailed Description

Feed-Forward 2 layers Neural Network with a tansig function for the hidden nodes and a purelin for the output nodes.

Definition at line 261 of file neuralNetworks.h.

Constructor & Destructor Documentation

◆ ff2LayNN_tansig_purelin() [1/2]

ff2LayNN_tansig_purelin::ff2LayNN_tansig_purelin ( )

Create an empty network.

Definition at line 360 of file neuralNetworks.cpp.

◆ ff2LayNN_tansig_purelin() [2/2]

iCub::ctrl::ff2LayNN_tansig_purelin::ff2LayNN_tansig_purelin ( const yarp::os::Property &  options)

Create and configure the network.

Parameters
optionscontains the parameters to configure the network.
See also
configure

Member Function Documentation

◆ hiddenLayerFcn()

Vector ff2LayNN_tansig_purelin::hiddenLayerFcn ( const yarp::sig::Vector &  x) const
virtual

Hidden Layer Function.

Parameters
xis the input vector.
Returns
the output vector.

Implements iCub::ctrl::ff2LayNN.

Definition at line 374 of file neuralNetworks.cpp.

◆ hiddenLayerGrad()

Vector ff2LayNN_tansig_purelin::hiddenLayerGrad ( const yarp::sig::Vector &  x) const
virtual

Gradient of the Hidden Layer Function.

Parameters
xis the input vector.
Returns
the output vector.

Implements iCub::ctrl::ff2LayNN.

Definition at line 392 of file neuralNetworks.cpp.

◆ outputLayerFcn()

Vector ff2LayNN_tansig_purelin::outputLayerFcn ( const yarp::sig::Vector &  x) const
virtual

Output Layer Function.

Parameters
xis the input vector.
Returns
the output vector.

Implements iCub::ctrl::ff2LayNN.

Definition at line 385 of file neuralNetworks.cpp.

◆ outputLayerGrad()

Vector ff2LayNN_tansig_purelin::outputLayerGrad ( const yarp::sig::Vector &  x) const
virtual

Gradient of the Output Layer Function.

Parameters
xis the input vector.
Returns
the output vector.

Implements iCub::ctrl::ff2LayNN.

Definition at line 407 of file neuralNetworks.cpp.


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