22#ifndef __NEURALNETWORKS_H__
23#define __NEURALNETWORKS_H__
29#include <yarp/os/Property.h>
30#include <yarp/sig/Vector.h>
57 std::deque<yarp::sig::Vector>
IW;
61 std::deque<yarp::sig::Vector>
LW;
83 void setItem(yarp::os::Property &options,
const std::string &tag,
const yarp::sig::Vector &item)
const;
84 bool getItem(
const yarp::os::Property &options,
const std::string &tag, yarp::sig::Vector &item)
const;
143 virtual bool configure(
const yarp::os::Property &options);
156 virtual yarp::sig::Vector
predict(
const yarp::sig::Vector &
x)
const;
164 virtual bool getStructure(yarp::os::Property &options)
const;
171 virtual bool printStructure(std::ostream &stream=std::cout)
const;
177 std::deque<yarp::sig::Vector> &
get_IW() {
return IW; }
183 std::deque<yarp::sig::Vector> &
get_LW() {
return LW; }
282 virtual yarp::sig::Vector
hiddenLayerFcn(
const yarp::sig::Vector &
x)
const;
289 virtual yarp::sig::Vector
outputLayerFcn(
const yarp::sig::Vector &
x)
const;
296 virtual yarp::sig::Vector
hiddenLayerGrad(
const yarp::sig::Vector &
x)
const;
303 virtual yarp::sig::Vector
outputLayerGrad(
const yarp::sig::Vector &
x)
const;
Feed-Forward 2 layers Neural Network with a tansig function for the hidden nodes and a purelin for th...
virtual yarp::sig::Vector hiddenLayerGrad(const yarp::sig::Vector &x) const
Gradient of the Hidden Layer Function.
ff2LayNN_tansig_purelin()
Create an empty network.
virtual yarp::sig::Vector outputLayerGrad(const yarp::sig::Vector &x) const
Gradient of the Output Layer Function.
virtual yarp::sig::Vector outputLayerFcn(const yarp::sig::Vector &x) const
Output Layer Function.
ff2LayNN_tansig_purelin(const yarp::os::Property &options)
Create and configure the network.
virtual yarp::sig::Vector hiddenLayerFcn(const yarp::sig::Vector &x) const
Hidden Layer Function.
Feed-Forward 2 layers Neural Network.
virtual yarp::sig::Vector hiddenLayerFcn(const yarp::sig::Vector &x) const =0
Hidden Layer Function.
yarp::sig::Vector outRatio
virtual yarp::sig::Vector hiddenLayerGrad(const yarp::sig::Vector &x) const =0
Gradient of the Hidden Layer Function.
virtual yarp::sig::Vector scaleOutputToNetFormat(const yarp::sig::Vector &x) const
Scale output to be used with the network.
yarp::sig::Vector inRatio
virtual yarp::sig::Vector outputLayerGrad(const yarp::sig::Vector &x) const =0
Gradient of the Output Layer Function.
yarp::sig::Vector & get_b1()
Retrieve first layer bias.
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
virtual bool isValid() const
Return the internal status after a configuration.
std::deque< minmax > inMinMaxX
virtual bool printStructure(std::ostream &stream=std::cout) const
Dump tadily the network structure on the stream.
yarp::sig::Vector outMinY
std::deque< minmax > inMinMaxY
yarp::sig::Vector & get_b2()
Retrieve second layer bias.
ff2LayNN()
Create an empty network.
std::deque< yarp::sig::Vector > IW
virtual yarp::sig::Vector scaleOutputFromNetFormat(const yarp::sig::Vector &x) const
Scale back output from the network's format.
virtual yarp::sig::Vector scaleInputToNetFormat(const yarp::sig::Vector &x) const
Scale input to be used with the network.
std::deque< yarp::sig::Vector > & get_LW()
Retrieve second layer weights.
std::deque< minmax > outMinMaxX
virtual bool configure(const yarp::os::Property &options)
Configure/reconfigure the network.
virtual yarp::sig::Vector predict(const yarp::sig::Vector &x) const
Predict the output given a certain input to the network.
std::deque< minmax > outMinMaxY
std::deque< yarp::sig::Vector > & get_IW()
Retrieve first layer weights.
yarp::sig::Vector outMinX
virtual yarp::sig::Vector outputLayerFcn(const yarp::sig::Vector &x) const =0
Output Layer Function.
std::deque< yarp::sig::Vector > LW
virtual bool getStructure(yarp::os::Property &options) const
Retrieve the network structure as a Property object.
virtual yarp::sig::Vector scaleInputFromNetFormat(const yarp::sig::Vector &x) const
Scale back input from the network's format.
ff2LayNN(const yarp::os::Property &options)
Create and configure the network.
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.