org.joone.engine
Class TanhLayer
- java.lang.Object
-
- org.joone.engine.Layer
-
- org.joone.engine.SimpleLayer
-
- org.joone.engine.TanhLayer
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Runnable, Learnable, LearnableLayer, NeuralLayer, Inspectable
public class TanhLayer extends SimpleLayer implements LearnableLayer
Layer that applies the tangent hyperbolic transfer function to its input patterns- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description TanhLayer()default constructorTanhLayer(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description voidbackward(double[] pattern)Reverse transfer function of the component.voidforward(double[] pattern)Transfer function to recall a result on a trained netdoublegetFlatSpotConstant()Gets the flat spot constant.LearnergetLearner()Deprecated.- Used only for backward compatibilityvoidsetFlatSpotConstant(double aConstant)Sets the constant to overcome the flat spot problem.-
Methods inherited from class org.joone.engine.SimpleLayer
getLearningRate, getLrate, getMomentum, setLrate, setMomentum, setMonitor
-
Methods inherited from class org.joone.engine.Layer
addInputSynapse, addNoise, addOutputSynapse, check, copyInto, finalize, fwdRun, getAllInputs, getAllOutputs, getBias, getDimension, getLastOutputs, getLayerName, getMonitor, getRows, hasStepCounter, init, initLearner, InspectableTitle, Inspections, isInputLayer, isOutputLayer, isRunning, join, randomize, removeAllInputs, removeAllOutputs, removeInputSynapse, removeOutputSynapse, revRun, run, setAllInputs, setAllOutputs, setBias, setInputSynapses, setLayerName, setOutputSynapses, setRows, start, stop, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.joone.engine.Learnable
getMonitor, initLearner
-
Methods inherited from interface org.joone.engine.NeuralLayer
addInputSynapse, addNoise, addOutputSynapse, check, copyInto, getAllInputs, getAllOutputs, getBias, getLayerName, getMonitor, getRows, isRunning, removeAllInputs, removeAllOutputs, removeInputSynapse, removeOutputSynapse, setAllInputs, setAllOutputs, setBias, setLayerName, setMonitor, setRows, start
-
-
-
-
Constructor Detail
-
TanhLayer
public TanhLayer()
default constructor
-
TanhLayer
public TanhLayer(java.lang.String name)
-
-
Method Detail
-
backward
public void backward(double[] pattern)
Description copied from class:LayerReverse transfer function of the component.- Parameters:
pattern- input pattern on which to apply the transfer function- See Also:
(double[])
-
forward
public void forward(double[] pattern)
Description copied from class:LayerTransfer function to recall a result on a trained net- Parameters:
pattern- input pattern to which to apply the rtransfer function- See Also:
(double[])
-
getLearner
public Learner getLearner()
Deprecated. - Used only for backward compatibilityDescription copied from class:LayerReturns the appropriate Learner object for this class depending on the Monitor.learningMode property value- Specified by:
getLearnerin interfaceLearnable- Overrides:
getLearnerin classLayer- Returns:
- the Learner object if applicable, otherwise null
- See Also:
Learnable.getLearner()
-
setFlatSpotConstant
public void setFlatSpotConstant(double aConstant)
Sets the constant to overcome the flat spot problem. This problem is described in: S.E. Fahlman, "An emperical study of learning speed in backpropagation with good scaling properties," Dept. Comput. Sci. Carnegie Mellon Univ., Pittsburgh, PA, Tech. Rep., CMU-CS-88-162, 1988. Setting this constant to 0 (default value), the derivative of the sigmoid function is unchanged (normal function). An good value for this constant might be 0.1.- Parameters:
aConstant-
-
getFlatSpotConstant
public double getFlatSpotConstant()
Gets the flat spot constant.- Returns:
- the flat spot constant.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG