public class NestedNeuralLayer extends Layer
Modifier and Type | Field and Description |
---|---|
(package private) static long |
serialVersionUID |
bias, gradientInps, gradientOuts, inps, inputPatternListeners, learnable, learning, m_batch, monitor, myLearner, outputPatternListeners, outs, running, step, STOP_FLAG
Constructor and Description |
---|
NestedNeuralLayer() |
NestedNeuralLayer(java.lang.String elemName) |
Modifier and Type | Method and Description |
---|---|
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
|
adjustSizeToFwdPattern, adjustSizeToRevPattern, checkInputEnabled, checkInputs, checkOutputs, finalize, fireFwdGet, fireFwdPut, fireRevGet, fireRevPut, getDimension, getLastGradientInps, getLastGradientOuts, getLastInputs, getLastOutputs, getLearner, getThreadMonitor, hasStepCounter, init, initLearner, InspectableTitle, Inspections, isInputLayer, isOutputLayer, join, randomizeBias, randomizeWeights, removeListener, resetInputListeners, run, setConnDimensions, setInputDimension, setInputSynapses, setLastInputs, setLastOutputs, setOutputDimension, setOutputSynapses, sumBackInput, sumInput, toString
static final long serialVersionUID
public NestedNeuralLayer()
public NestedNeuralLayer(java.lang.String elemName)
protected void setDimensions()
Layer
setDimensions
in class Layer
protected void forward(double[] pattern)
Layer
protected void backward(double[] pattern)
Layer
public 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
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
public 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 synapsepublic 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 addpublic 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 onepublic 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
public void revRun(Pattern pattIn)
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
Submit Feedback to pmarrone@users.sourceforge.net