org.joone.engine
Interface NeuralLayer
-
- All Known Subinterfaces:
- LearnableLayer
- All Known Implementing Classes:
- BiasedLinearLayer, ContextLayer, DelayLayer, GaussianLayer, GaussLayer, Layer, LinearLayer, LogarithmicLayer, MemoryLayer, NestedNeuralLayer, NeuralNet, RbfGaussianLayer, RbfLayer, SigmoidLayer, SimpleLayer, SineLayer, SoftmaxLayer, TanhLayer, WTALayer
public interface NeuralLayerThis is the interface for all the layer objects of the neural network
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method and Description booleanaddInputSynapse(InputPatternListener newListener)Adds a new input synapse to the layervoidaddNoise(double amplitude)Adds a noise to the biases of the layer and to all the input synapses connectedbooleanaddOutputSynapse(OutputPatternListener newListener)Adds a new output synapse to the layerjava.util.TreeSetcheck()Validation checks for invalid parameter values, misconfiguration, etc.NeuralLayercopyInto(NeuralLayer newLayer)Copies a Layer into another one, to obtain a type-transformation from a kind of Layer to another.java.util.VectorgetAllInputs()Returns the vector of the input listenersjava.util.VectorgetAllOutputs()Returns the vector of the input listenersMatrixgetBias()Return the bias matrixjava.lang.StringgetLayerName()Returns the name of the layerMonitorgetMonitor()Returns the monitor objectintgetRows()Returns the dimension (# of neurons) of the LayerbooleanisRunning()Returns true if the layer is runningvoidremoveAllInputs()Remove all the input listeners of the netvoidremoveAllOutputs()Remove all the output listeners of the netvoidremoveInputSynapse(InputPatternListener newListener)Remove an input ListenervoidremoveOutputSynapse(OutputPatternListener newListener)Remove an output listener from the layervoidsetAllInputs(java.util.Vector newAInputPatternListener)Sets the vector that contains all the input listeners.voidsetAllOutputs(java.util.Vector newAOutputPatternListener)Sets the vector that contains all the output listeners.voidsetBias(Matrix newBias)Sets the matrix of biasesvoidsetLayerName(java.lang.String newLayerName)Sets the name of the layervoidsetMonitor(Monitor newMonitor)Sets the monitor objectvoidsetRows(int newRows)Sets the dimension (# of neurons) of the Layervoidstart()Starts the Layer
-
-
-
Method Detail
-
addNoise
void addNoise(double amplitude)
Adds a noise to the biases of the layer and to all the input synapses connected- Parameters:
amplitude- the noise's amplitude in terms of distance from zero; e.g.: a value equal 0.3 means a noise from -0.3 to 0.3
-
copyInto
NeuralLayer copyInto(NeuralLayer newLayer)
Copies a Layer into another one, to obtain a type-transformation from a kind of Layer to another. The old Layer is disconnected from the net, while the new Layer takes its place.- Parameters:
newLayer- neural.engine.Layer- Returns:
- The new layer
-
getAllInputs
java.util.Vector getAllInputs()
Returns the vector of the input listeners- Returns:
- java.util.Vector
-
getAllOutputs
java.util.Vector getAllOutputs()
Returns the vector of the input listeners- Returns:
- java.util.Vector
-
getBias
Matrix getBias()
Return the bias matrix- Returns:
- neural.engine.Matrix
-
getLayerName
java.lang.String getLayerName()
Returns the name of the layer- Returns:
- java.lang.String
-
getRows
int getRows()
Returns the dimension (# of neurons) of the Layer- Returns:
- int
-
removeAllInputs
void removeAllInputs()
Remove all the input listeners of the net
-
removeAllOutputs
void removeAllOutputs()
Remove all the output listeners of the net
-
removeInputSynapse
void removeInputSynapse(InputPatternListener newListener)
Remove an input Listener- Parameters:
newListener- the input listener to remove
-
removeOutputSynapse
void removeOutputSynapse(OutputPatternListener newListener)
Remove an output listener from the layer- Parameters:
newListener- the output listener to remove
-
setAllInputs
void setAllInputs(java.util.Vector newAInputPatternListener)
Sets the vector that contains all the input listeners. Can be useful to set the input synapses taken from another Layer- Parameters:
newAInputPatternListener- The vector containing the list of input synapses
-
setAllOutputs
void setAllOutputs(java.util.Vector newAOutputPatternListener)
Sets the vector that contains all the output listeners. Can be useful to set the output synapses taken from another Layer- Parameters:
newAOutputPatternListener- The vector containing the list of output synapses
-
setBias
void setBias(Matrix newBias)
Sets the matrix of biases- Parameters:
newBias- The Matrix object containing the biases
-
addInputSynapse
boolean addInputSynapse(InputPatternListener newListener)
Adds a new input synapse to the layer- Parameters:
newListener- The new input synapse- Returns:
- true if the input synapse has been attached sucessfully
-
setLayerName
void setLayerName(java.lang.String newLayerName)
Sets the name of the layer- Parameters:
newLayerName- The name
-
addOutputSynapse
boolean addOutputSynapse(OutputPatternListener newListener)
Adds a new output synapse to the layer- Parameters:
newListener- The new output synapse- Returns:
- true if the output synapse has been attached sucessfully
-
setRows
void setRows(int newRows)
Sets the dimension (# of neurons) of the Layer- Parameters:
newRows- The number of the neurons contained in the Layer
-
start
void start()
Starts the Layer
-
setMonitor
void setMonitor(Monitor newMonitor)
Sets the monitor object- Parameters:
newMonitor- The Monitor to be set
-
getMonitor
Monitor getMonitor()
Returns the monitor object- Returns:
- java.engine.Monitor
-
isRunning
boolean isRunning()
Returns true if the layer is running- Returns:
- boolean
-
check
java.util.TreeSet check()
Validation checks for invalid parameter values, misconfiguration, etc. All network components should include a check method that firstly calls its ancestor check method and adds these to any check messages it produces. This allows check messages to be collected from all levels of a component to be returned to the caller's check method. Using a TreeSet ensures that duplicate messages are removed. Check messages should be produced using the generateValidationErrorMessage method of the NetChecker class.- Returns:
- validation errors.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG