|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.joone.engine.Layer
org.joone.net.NestedNeuralLayer
public class NestedNeuralLayer
Field Summary | |
---|---|
(package private) static long |
serialVersionUID
|
Fields inherited from class org.joone.engine.Layer |
---|
bias, gradientInps, gradientOuts, inps, inputPatternListeners, learnable, learning, m_batch, monitor, myLearner, outputPatternListeners, outs, running, step, STOP_FLAG |
Constructor Summary | |
---|---|
NestedNeuralLayer()
|
|
NestedNeuralLayer(java.lang.String elemName)
|
Method Summary | |
---|---|
boolean |
addInputSynapse(InputPatternListener p1)
Adds a new input synapse to the layer |
void |
addNoise(double p1)
Adds a noise componentto the biases of the layer and to all the input connected synapses. |
boolean |
addOutputSynapse(OutputPatternListener p1)
Adds a new output synapse to the layer |
protected void |
backward(double[] pattern)
Reverse transfer function of the component. |
java.util.TreeSet |
check()
Get check messages from listeners. |
NeuralLayer |
copyInto(NeuralLayer p1)
Copies one layer into another, to obtain a type-transformation from one kind of Layer to another. |
protected void |
forward(double[] pattern)
Transfer function to recall a result on a trained net |
void |
fwdRun(Pattern pattIn)
Implementation code for the single-thread version of Joone. |
java.util.Vector |
getAllInputs()
Returns the vector of the input listeners |
java.util.Vector |
getAllOutputs()
Returns the vector of the output listeners |
Matrix |
getBias()
Return the bias matrix |
double |
getDefaultState()
Return the default state of a node in this layer, such as 0 for a tanh or 0.5 for a sigmoid layer |
double |
getDerivative(int i)
Similar to the backward message and used by RTRL |
java.io.File |
getEmbeddedNet()
|
java.lang.String |
getLayerName()
Returns the name of the layer |
double |
getMaximumState()
Return maximum value of a node in this layer |
double |
getMinimumState()
Return minimum value of a node in this layer |
Monitor |
getMonitor()
Returns the monitor object |
NeuralNet |
getNestedNeuralNet()
Getter for property NestedNeuralNet. |
java.lang.String |
getNeuralNet()
|
int |
getRows()
Returns the dimension (# of neurons) of the Layer |
boolean |
isLearning()
Getter for property learning. |
boolean |
isRunning()
Determine whether the execution thread is running |
void |
randomize(double amplitude)
Initialize the weights of the biases and of all the connected synapses WARNING: amplitude parameter is ignored when elements are using WeightInitializer other than RandomWeightInitializer |
void |
removeAllInputs()
Remove all the input listeners of the layer |
void |
removeAllOutputs()
Remove all the output listeners of the layer |
void |
removeInputSynapse(InputPatternListener p1)
Remove an input Listener |
void |
removeOutputSynapse(OutputPatternListener p1)
Remove an output listener from the layer |
void |
revRun(Pattern pattIn)
This method serves to a single backward step when the Layer is called from an external thread |
void |
setAllInputs(java.util.Vector p1)
Sets the Vector that contains all the input listeners. |
void |
setAllOutputs(java.util.Vector p1)
Sets the Vector that contains all the output listeners. |
void |
setBias(Matrix p1)
Sets the matrix of biases |
protected void |
setDimensions()
Sets the dimension of the layer. |
void |
setEmbeddedNet(java.io.File embeddedNet)
|
void |
setLayerName(java.lang.String p1)
Sets the name of the layer |
void |
setLearning(boolean learning)
Setter for property learning. |
void |
setMonitor(Monitor p1)
Sets the monitor object |
void |
setNestedNeuralNet(NeuralNet newNeuralNet)
Setter for property NestedNeuralNet. |
void |
setNeuralNet(java.lang.String NNFile)
|
void |
setRows(int p1)
Sets the dimension (# of neurons) of the Layer |
void |
start()
Starts the Layer |
void |
stop()
Stops the Layer |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
Constructor Detail |
---|
public NestedNeuralLayer()
public NestedNeuralLayer(java.lang.String elemName)
Method Detail |
---|
protected void setDimensions()
Layer
setDimensions
in class Layer
protected void forward(double[] pattern)
Layer
forward
in class Layer
pattern
- input pattern to which to apply the rtransfer functionprotected void backward(double[] pattern)
Layer
backward
in class Layer
pattern
- input pattern on which to apply the transfer functionpublic double getDerivative(int i)
getDerivative
in class Layer
public java.lang.String getNeuralNet()
public void setNeuralNet(java.lang.String NNFile)
public void start()
Layer
start
in interface NeuralLayer
start
in class Layer
public void stop()
Layer
stop
in class Layer
public int getRows()
Layer
getRows
in interface NeuralLayer
getRows
in class Layer
public void setRows(int p1)
Layer
setRows
in interface NeuralLayer
setRows
in class Layer
p1
- The number of the neurons contained in the Layerpublic void addNoise(double p1)
Layer
addNoise
in interface NeuralLayer
addNoise
in class Layer
p1
- the noise's amplitude in terms of distance from zero;
e.g. a value equal 0.3 means a noise range from -0.3 to 0.3public void randomize(double amplitude)
Layer
randomize
in class Layer
amplitude
- the amplitude of uniformly generated random weightspublic Matrix getBias()
Layer
getBias
in interface NeuralLayer
getBias
in class Layer
public java.util.Vector getAllOutputs()
Layer
getAllOutputs
in interface NeuralLayer
getAllOutputs
in class Layer
public java.lang.String getLayerName()
Layer
getLayerName
in interface NeuralLayer
getLayerName
in class Layer
public void removeOutputSynapse(OutputPatternListener p1)
Layer
removeOutputSynapse
in interface NeuralLayer
removeOutputSynapse
in class Layer
p1
- the output listener to removepublic void setAllInputs(java.util.Vector p1)
Layer
setAllInputs
in interface NeuralLayer
setAllInputs
in class Layer
p1
- The vector containing the list of input synapsespublic void removeAllOutputs()
Layer
removeAllOutputs
in interface NeuralLayer
removeAllOutputs
in class Layer
public java.util.Vector getAllInputs()
Layer
getAllInputs
in interface NeuralLayer
getAllInputs
in class Layer
public boolean addOutputSynapse(OutputPatternListener p1)
Layer
addOutputSynapse
in interface NeuralLayer
addOutputSynapse
in class Layer
p1
- The new output synapse
public void setBias(Matrix p1)
Layer
setBias
in interface NeuralLayer
setBias
in class Layer
p1
- The Matrix object containing the biasespublic void removeInputSynapse(InputPatternListener p1)
Layer
removeInputSynapse
in interface NeuralLayer
removeInputSynapse
in class Layer
p1
- the input listener to removepublic void setLayerName(java.lang.String p1)
Layer
setLayerName
in interface NeuralLayer
setLayerName
in class Layer
p1
- The namepublic boolean addInputSynapse(InputPatternListener p1)
Layer
addInputSynapse
in interface NeuralLayer
addInputSynapse
in class Layer
p1
- The new input synapse to add
public void setAllOutputs(java.util.Vector p1)
Layer
setAllOutputs
in interface NeuralLayer
setAllOutputs
in class Layer
p1
- The vector containing the list of output synapsespublic void setMonitor(Monitor p1)
Layer
setMonitor
in interface NeuralLayer
setMonitor
in class Layer
p1
- The Monitorpublic Monitor getMonitor()
Layer
getMonitor
in interface Learnable
getMonitor
in interface NeuralLayer
getMonitor
in class Layer
public void removeAllInputs()
Layer
removeAllInputs
in interface NeuralLayer
removeAllInputs
in class Layer
public NeuralLayer copyInto(NeuralLayer p1)
Layer
copyInto
in interface NeuralLayer
copyInto
in class Layer
p1
- the new layer with which to replace this one
public boolean isRunning()
Layer
isRunning
in interface NeuralLayer
isRunning
in class Layer
public NeuralNet getNestedNeuralNet()
public void setNestedNeuralNet(NeuralNet newNeuralNet)
NestedNeuralNet
- New value of property NestedNeuralNet.public boolean isLearning()
public void setLearning(boolean learning)
learning
- New value of property learning.public java.util.TreeSet check()
Layer
check
in interface NeuralLayer
check
in class Layer
NeuralLayer
public java.io.File getEmbeddedNet()
public void setEmbeddedNet(java.io.File embeddedNet)
public void fwdRun(Pattern pattIn)
Layer
fwdRun
in class Layer
public void revRun(Pattern pattIn)
Layer
revRun
in class Layer
public double getDefaultState()
Layer
getDefaultState
in class Layer
public double getMinimumState()
Layer
getMinimumState
in class Layer
public double getMaximumState()
Layer
getMaximumState
in class Layer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |