|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Layer
This interface defines all necessary methods for a neural network layer.
| Method Summary | |
|---|---|
void |
addNext(Layer next)
Add a layer to this layer. |
void |
addNext(Layer next,
SynapseType type)
Add a layer to this layer. |
void |
addSynapse(Synapse synapse)
This method adds a synapse to the neural network. |
NeuralData |
compute(NeuralData pattern)
Compute the output for this layer. |
ActivationFunction |
getActivationFunction()
|
double |
getBiasActivation()
Most layer types will default this value to one. |
double |
getBiasWeight(int index)
Get an bias weight value. |
double[] |
getBiasWeights()
|
int |
getID()
|
BasicNetwork |
getNetwork()
|
int |
getNeuronCount()
|
List<Synapse> |
getNext()
Get a list of all of the outbound synapse connections from this layer. |
Collection<Layer> |
getNextLayers()
|
int |
getX()
|
int |
getY()
|
boolean |
hasBias()
|
boolean |
isConnectedTo(Layer layer)
Determine if this layer is connected to another. |
void |
process(NeuralData pattern)
Process the data before it is modified by this layer. |
NeuralData |
recur()
Called on recurrent layers to provide recurrent output. |
void |
setActivationFunction(ActivationFunction activationFunction)
Set a new activation function for this layer. |
void |
setBiasActivation(double activation)
Most layer types will default this value to one. |
void |
setBiasWeight(int index,
double d)
Set an individual bias weight value. |
void |
setBiasWeights(double[] d)
Set the bias weight array for this layer. |
void |
setID(int id)
Set the id for this layer. |
void |
setNetwork(BasicNetwork network)
Set the network that this layer belongs to. |
void |
setNeuronCount(int neuronCount)
Set the neuron count, this will NOT adjust the synapses or bias weights other code must do that. |
void |
setX(int x)
Set the x coordinate. |
void |
setY(int y)
Set the y coordinate. |
| Methods inherited from interface org.encog.persist.EncogPersistedObject |
|---|
createPersistor, getCollection, getDescription, getName, setCollection, setDescription, setName |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Method Detail |
|---|
void addNext(Layer next)
next - The layer that is to be added.
void addNext(Layer next,
SynapseType type)
next - The layer that is to be added.type - The type of synapse to add.void addSynapse(Synapse synapse)
synapse - The synapse to add.NeuralData compute(NeuralData pattern)
pattern - The input pattern.
ActivationFunction getActivationFunction()
int getID()
BasicNetwork getNetwork()
int getNeuronCount()
List<Synapse> getNext()
Collection<Layer> getNextLayers()
double[] getBiasWeights()
double getBiasWeight(int index)
index - The bias value to get.
int getX()
int getY()
boolean hasBias()
boolean isConnectedTo(Layer layer)
layer - The second layer, checked to see if it is connected to this
layer.
void process(NeuralData pattern)
pattern - The pattern.NeuralData recur()
void setActivationFunction(ActivationFunction activationFunction)
activationFunction - The new activation function.void setID(int id)
id - The id for this layer.void setNetwork(BasicNetwork network)
network - The network.void setNeuronCount(int neuronCount)
neuronCount - The new neuron countvoid setBiasWeights(double[] d)
d - The new bias weight array.
void setBiasWeight(int index,
double d)
index - The index of the bias weight value.d - The new bias weight value.void setX(int x)
x - The x-coordinate.void setY(int y)
y - The y-coordinate.void setBiasActivation(double activation)
activation - The activation for the bias weights.double getBiasActivation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||