[Home]History of NRLIBJ

Robo Home | Changes | Preferences | AllPages


Revision 8 . . (edit) July 3, 2003 12:13 EST by 212.109.72.xxx
Revision 7 . . (edit) June 15, 2003 17:38 EST by pop-mu-11-1-dialup-64.freesurf.ch
Revision 5 . . June 14, 2003 16:20 EST by Synnalagma
  

Difference (from prior major revision) (minor diff, author diff)

Changed: 180c180,222
Synnalagma
Synnalagma


Some other Node class Tanh is for output between -1 and 1 and Gaussian output 0 1:

public class NodeGaussian? extends NodeLin? {
float x=1f;

public NodeGaussian?(int nn,int nly,float b)
{
super(nn,nly,b);
}

protected float afn(float x)
{
this.x=x;
return (float) Math.exp(-x*x);
}
protected float df(float y)
{
return -2f*x*y;
}

}

public class NodeTanh? extends NodeLin? {

public NodeTanh?(int nn,int nly,float b)
{
super(nn,nly,b);
}

protected float afn(float x)
{
return (float) 2f / (1f + (float)Math.exp(-2 * x)) - 1f;
}
protected float df(float y)
{
return 1-y*y;
}
}

Synnalagma

Robo Home | Changes | Preferences | AllPages
Search: