iCub-main
Loading...
Searching...
No Matches
neuralNetworks.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2013 iCub Facility - Istituto Italiano di Tecnologia
3 * Author: Ugo Pattacini
4 * email: ugo.pattacini@iit.it
5 * Permission is granted to copy, distribute, and/or modify this program
6 * under the terms of the GNU General Public License, version 2 or any
7 * later version published by the Free Software Foundation.
8 *
9 * A copy of the license can be found at
10 * http://www.robotcub.org/icub/license/gpl.txt
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
15 * Public License for more details
16*/
17
28#ifndef __ICUB_OPT_NNTRAINING_H__
29#define __ICUB_OPT_NNTRAINING_H__
30
31#include <deque>
32#include <yarp/os/all.h>
33#include <yarp/sig/all.h>
34
36
37#ifdef WIN32
38 #pragma warning(disable:4250)
39#endif
40
41namespace iCub
42{
43
44namespace optimization
45{
46
54{
55protected:
56 yarp::os::Property bounds;
57 void* App;
58
59public:
64
72 void setBounds(const yarp::os::Property &bounds);
73
83 virtual bool train(const unsigned int numHiddenNodes, const std::deque<yarp::sig::Vector> &in,
84 const std::deque<yarp::sig::Vector> &out, std::deque<yarp::sig::Vector> &pred,
85 double &error);
86
96 virtual bool retrain(const std::deque<yarp::sig::Vector> &in, const std::deque<yarp::sig::Vector> &out,
97 std::deque<yarp::sig::Vector> &pred, double &error);
98
102 virtual ~ff2LayNNTrain();
103};
104
105
117
118}
119
120}
121
122#endif
123
124
125
Feed-Forward 2 layers Neural Network with a tansig function for the hidden nodes and a purelin for th...
Feed-Forward 2 layers Neural Network.
Class to deal with training of Feed-Forward 2 layers Neural Network with a tansig function for the hi...
Class to deal with training of Feed-Forward 2 layers Neural Network using IpOpt.
void setBounds(const yarp::os::Property &bounds)
Allow specifying the bounds for training network's parameters.
virtual bool train(const unsigned int numHiddenNodes, const std::deque< yarp::sig::Vector > &in, const std::deque< yarp::sig::Vector > &out, std::deque< yarp::sig::Vector > &pred, double &error)
Train the network through optimization.
virtual bool retrain(const std::deque< yarp::sig::Vector > &in, const std::deque< yarp::sig::Vector > &out, std::deque< yarp::sig::Vector > &pred, double &error)
Retrain the network through optimization.
virtual ~ff2LayNNTrain()
Default destructor.
bool error
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
out
Definition sine.m:8