|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.encog.neural.networks.layers.BasicLayer
org.encog.neural.networks.layers.ContextLayer
public class ContextLayer
Implements a context layer. A context layer is used to implement a simple recurrent neural network, such as an Elman or Jordan neural network. The context layer has a short-term memory. The context layer accept input, and provide the same data as output on the next cycle. This continues, and the context layer's output "one step" out of sync with the input.
| Constructor Summary | |
|---|---|
ContextLayer()
Default constructor, mainly so the workbench can easily create a default layer. |
|
ContextLayer(ActivationFunction thresholdFunction,
boolean hasThreshold,
int neuronCount)
Construct a context layer with the parameters specified. |
|
ContextLayer(int neuronCount)
Construct a default context layer that has the TANH activation function and the specified number of neurons. |
|
| Method Summary | |
|---|---|
void |
clearContext()
Reset the context values back to zero. |
Persistor |
createPersistor()
Create a persistor for this layer. |
NeuralData |
getContext()
|
void |
process(NeuralData pattern)
Called to process input from the previous layer. |
NeuralData |
recur()
Called to get the output from this layer when called in a recurrent manor. |
| Methods inherited from class org.encog.neural.networks.layers.BasicLayer |
|---|
addNext, addNext, addSynapse, compareTo, compute, getActivationFunction, getDescription, getID, getName, getNetwork, getNeuronCount, getNext, getNextLayers, getThreshold, getThreshold, getX, getY, hasThreshold, isConnectedTo, isSelfConnected, setActivationFunction, setDescription, setID, setName, setNetwork, setNeuronCount, setThreshold, setThreshold, setX, setY, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ContextLayer()
public ContextLayer(ActivationFunction thresholdFunction,
boolean hasThreshold,
int neuronCount)
thresholdFunction - The threshold function to use.hasThreshold - Does this layer have thresholds?neuronCount - The neuron count to use.public ContextLayer(int neuronCount)
neuronCount - The number of neurons on this layer.| Method Detail |
|---|
public Persistor createPersistor()
createPersistor in interface EncogPersistedObjectcreatePersistor in class BasicLayerpublic NeuralData getContext()
public void process(NeuralData pattern)
process in interface Layerprocess in class BasicLayerpattern - The pattern to store in the context.public NeuralData recur()
recur in interface Layerrecur in class BasicLayerpublic void clearContext()
clearContext in interface ContextClearable
|
The Encog Project | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||