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, toStringstatic final long serialVersionUID
public NestedNeuralLayer()
public NestedNeuralLayer(java.lang.String elemName)
protected void setDimensions()
LayersetDimensions in class Layerprotected void forward(double[] pattern)
Layerprotected void backward(double[] pattern)
Layerpublic double getDerivative(int i)
getDerivative in class Layerpublic java.lang.String getNeuralNet()
public void setNeuralNet(java.lang.String NNFile)
public void start()
Layerstart in interface NeuralLayerstart in class Layerpublic void stop()
Layerpublic int getRows()
LayergetRows in interface NeuralLayergetRows in class Layerpublic void setRows(int p1)
LayersetRows in interface NeuralLayersetRows in class Layerp1 - The number of the neurons contained in the Layerpublic void addNoise(double p1)
LayeraddNoise in interface NeuralLayeraddNoise in class Layerp1 - 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)
Layerpublic Matrix getBias()
LayergetBias in interface NeuralLayergetBias in class Layerpublic java.util.Vector getAllOutputs()
LayergetAllOutputs in interface NeuralLayergetAllOutputs in class Layerpublic java.lang.String getLayerName()
LayergetLayerName in interface NeuralLayergetLayerName in class Layerpublic void removeOutputSynapse(OutputPatternListener p1)
LayerremoveOutputSynapse in interface NeuralLayerremoveOutputSynapse in class Layerp1 - the output listener to removepublic void setAllInputs(java.util.Vector p1)
LayersetAllInputs in interface NeuralLayersetAllInputs in class Layerp1 - The vector containing the list of input synapsespublic void removeAllOutputs()
LayerremoveAllOutputs in interface NeuralLayerremoveAllOutputs in class Layerpublic java.util.Vector getAllInputs()
LayergetAllInputs in interface NeuralLayergetAllInputs in class Layerpublic boolean addOutputSynapse(OutputPatternListener p1)
LayeraddOutputSynapse in interface NeuralLayeraddOutputSynapse in class Layerp1 - The new output synapsepublic void setBias(Matrix p1)
LayersetBias in interface NeuralLayersetBias in class Layerp1 - The Matrix object containing the biasespublic void removeInputSynapse(InputPatternListener p1)
LayerremoveInputSynapse in interface NeuralLayerremoveInputSynapse in class Layerp1 - the input listener to removepublic void setLayerName(java.lang.String p1)
LayersetLayerName in interface NeuralLayersetLayerName in class Layerp1 - The namepublic boolean addInputSynapse(InputPatternListener p1)
LayeraddInputSynapse in interface NeuralLayeraddInputSynapse in class Layerp1 - The new input synapse to addpublic void setAllOutputs(java.util.Vector p1)
LayersetAllOutputs in interface NeuralLayersetAllOutputs in class Layerp1 - The vector containing the list of output synapsespublic void setMonitor(Monitor p1)
LayersetMonitor in interface NeuralLayersetMonitor in class Layerp1 - The Monitorpublic Monitor getMonitor()
LayergetMonitor in interface LearnablegetMonitor in interface NeuralLayergetMonitor in class Layerpublic void removeAllInputs()
LayerremoveAllInputs in interface NeuralLayerremoveAllInputs in class Layerpublic NeuralLayer copyInto(NeuralLayer p1)
LayercopyInto in interface NeuralLayercopyInto in class Layerp1 - the new layer with which to replace this onepublic boolean isRunning()
LayerisRunning in interface NeuralLayerisRunning in class Layerpublic 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()
Layercheck in interface NeuralLayercheck in class LayerNeuralLayerpublic java.io.File getEmbeddedNet()
public void setEmbeddedNet(java.io.File embeddedNet)
public void fwdRun(Pattern pattIn)
Layerpublic void revRun(Pattern pattIn)
Layerpublic double getDefaultState()
LayergetDefaultState in class Layerpublic double getMinimumState()
LayergetMinimumState in class Layerpublic double getMaximumState()
LayergetMaximumState in class LayerSubmit Feedback to pmarrone@users.sourceforge.net