|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.encog.neural.networks.structure.NeuralStructure
public class NeuralStructure
Holds "cached" information about the structure of the neural network. This is a very good performance boost since the neural network does not need to traverse itself each time a complete collection of layers or synapses is needed.
| Constructor Summary | |
|---|---|
NeuralStructure(BasicNetwork network)
Construct a structure object for the specified network. |
|
| Method Summary | |
|---|---|
void |
assignID()
Assign an ID to every layer that does not already have one. |
void |
assignID(Layer layer)
Assign an ID to the specified layer. |
int |
calculateSize()
Calculate the size that an array should be to hold all of the weights and bias values. |
boolean |
containsLayerType(Class<?> type)
Determine if the network contains a layer of the specified type. |
void |
enforceLimit()
Enforce that all connections are above the connection limit. |
void |
finalizeStructure()
Build the synapse and layer structure. |
Synapse |
findNextSynapseByLayerType(Layer layer,
Class<? extends Layer> type)
Find the next synapse by layer type. |
Synapse |
findPreviousSynapseByLayerType(Layer layer,
Class<? extends Layer> type)
Find previous synapse by layer type. |
Synapse |
findSynapse(Layer fromLayer,
Layer toLayer,
boolean required)
Find the specified synapse, throw an error if it is required. |
void |
flatten()
Flatten the network. |
void |
flattenWeights()
Flatten the weights, do not restructure. |
double |
getConnectionLimit()
|
FlatNetwork |
getFlat()
|
FlatUpdateNeeded |
getFlatUpdate()
|
List<Layer> |
getLayers()
|
BasicNetwork |
getNetwork()
|
int |
getNextID()
Get the next layer id. |
Collection<Layer> |
getPreviousLayers(Layer targetLayer)
Get the previous layers from the specified layer. |
List<Synapse> |
getPreviousSynapses(Layer targetLayer)
Get the previous synapses. |
List<Synapse> |
getSynapses()
|
boolean |
isConnectionLimited()
|
boolean |
isRecurrent()
|
List<String> |
nameLayer(Layer layer)
Obtain a name for the specified layer. |
void |
setFlatUpdate(FlatUpdateNeeded flatUpdate)
Set the type of flat update needed. |
void |
sort()
Sort the layers and synapses. |
void |
unflattenWeights()
Unflatten the weights. |
void |
updateFlatNetwork()
Update the flat network. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NeuralStructure(BasicNetwork network)
network - The network to construct a structure for.| Method Detail |
|---|
public void assignID()
public void assignID(Layer layer)
layer - The layer to get an ID assigned.public int calculateSize()
public boolean containsLayerType(Class<?> type)
type - The layer type we are looking for.
public void enforceLimit()
public void finalizeStructure()
public Synapse findNextSynapseByLayerType(Layer layer,
Class<? extends Layer> type)
layer - The layer to search from.type - The synapse type to look for.
public Synapse findPreviousSynapseByLayerType(Layer layer,
Class<? extends Layer> type)
layer - The layer to start from.type - The type of layer.
public Synapse findSynapse(Layer fromLayer,
Layer toLayer,
boolean required)
fromLayer - The from layer.toLayer - The to layer.required - Is this required?
public void flatten()
public void flattenWeights()
public double getConnectionLimit()
public FlatNetwork getFlat()
public FlatUpdateNeeded getFlatUpdate()
public List<Layer> getLayers()
public BasicNetwork getNetwork()
public int getNextID()
public Collection<Layer> getPreviousLayers(Layer targetLayer)
targetLayer - The target layer.
public List<Synapse> getPreviousSynapses(Layer targetLayer)
targetLayer - The layer to get the previous layers from.
public List<Synapse> getSynapses()
public boolean isConnectionLimited()
public boolean isRecurrent()
public List<String> nameLayer(Layer layer)
layer - The layer to name.
public void setFlatUpdate(FlatUpdateNeeded flatUpdate)
flatUpdate - The type of flat update needed.public void sort()
public void unflattenWeights()
public void updateFlatNetwork()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||