Source: NNet/include/NNetSet.h
|
|
|
|
// Copyright (C) 2001 Jean-Marc Valin
#include <math.h>
#include <vector>
#include <iostream>
#include "Object.h"
#include "FFNet.h"
class NNetSet;
ostream &operator << (ostream &out, const NNetSet &cell);
class NNetSet : public Object {
protected:
vector<RCPtr<FFNet> > nets;
float *value;
public:
//NNetSet()
//{}
NNetSet(){value = NULL;}
NNetSet (const NNetSet &) {cerr << "don't call the NNetSet copy constructor\n"; exit(1);}
NNetSet(int nbNets, const Vector<int> &topo, const Vector<string> &functions, vector<int> id, vector<float *> &tin, vector<float *> &tout);
NNetSet(vector<int> id, vector<float *> &tin, vector<float *> &tout, NNetSet *net1, NNetSet *net2);
~NNetSet()
{
delete [] value;
}
float *calc(int id, const float *input);
//void train(vector<int> id, vector<float *> tin, vector<float *> tout, int iter,
// double learnRate, double mom, double increase, double decrease, double errRatio, int nbSets);
void trainDeltaBar(vector<int> id, vector<float *> tin, vector<float *> tout,
int iter, double learnRate, double increase, double decrease);
//void trainCGB(vector<int> id, vector<float *> tin, vector<float *> tout,
// int iter, double sigma = .03, double lambda = .2);
void printOn(ostream &out) const;
void readFrom (istream &in);
friend istream &operator >> (istream &in, NNetSet &cell);
};
Generated by: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:43 2002, using kdoc 2.0a40. |