com.penguinwerks.jodene.activation
Class TanhActivationFunction

java.lang.Object
  extended bycom.penguinwerks.jodene.activation.TanhActivationFunction
All Implemented Interfaces:
ActivationFunction, java.io.Serializable

public class TanhActivationFunction
extends java.lang.Object
implements ActivationFunction

This implements a tanh activation function.

Author:
Paul Hoehne
See Also:
Serialized Form

Constructor Summary
TanhActivationFunction()
          Creates a new instance of TanhActivationFunction
 
Method Summary
 double activation(double val)
          Returns the tanh activation.
 double derivative(double val)
          Returns the tanh derivative.
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TanhActivationFunction

public TanhActivationFunction()
Creates a new instance of TanhActivationFunction

Method Detail

activation

public double activation(double val)
Returns the tanh activation.

Specified by:
activation in interface ActivationFunction
Parameters:
val - The value.
Returns:
The activaiton value.

derivative

public double derivative(double val)
Returns the tanh derivative.

Specified by:
derivative in interface ActivationFunction
Parameters:
val - The parameter value.
Returns:
The derivative.

main

public static void main(java.lang.String[] args)