net.sourceforge.cilib.neuralnetwork.generic
Class GenericTopology
java.lang.Object
net.sourceforge.cilib.neuralnetwork.generic.GenericTopology
- All Implemented Interfaces:
- Initializable, NeuralNetworkTopology
- Direct Known Subclasses:
- LayeredGenericTopology
public abstract class GenericTopology
- extends Object
- implements NeuralNetworkTopology, Initializable
- Author:
- stefanv
This class serves as a generic topology class capable of representing almost any topology. It is basically a
multidimensional collection of NeuronConfig objects. NeuronConfig objects are used to configure NeuronPipeline
objects (Flyweight design pattern). A Typical NN would have about 3 or so NeuronPipelines i.e. Sigmoid, linear
and Bias unit.
GenericTopologyVisitor objects are used to access NeuronConfig objects in a "left-to-right, top-to-bottom"
fashion. The Observer Pattern in also supported - clients just need to register. This class forms part of the
Generic Framework and may be extended if needed. It should work "as-is" in most cases. There is also a
getLayerIterator() method to manually traverse layers (NeuronConfig objects).
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericTopology
public GenericTopology()
initialize
public void initialize()
- Specified by:
initialize
in interface Initializable
acceptVisitor
public void acceptVisitor(GenericTopologyVisitor v)
addObserver
public void addObserver(Observer v)
evaluate
public abstract TypeList evaluate(NNPattern p)
- Specified by:
evaluate
in interface NeuralNetworkTopology
getLayer
public ArrayList<NeuronConfig> getLayer(int index)
getLayerIterator
public StandardLayerIterator getLayerIterator(int layer)
getNrLayers
public int getNrLayers()
getWeights
public Vector getWeights()
- Specified by:
getWeights
in interface NeuralNetworkTopology
notifyObservers
public void notifyObservers()
removeObserver
public void removeObserver(Observer v)
setWeights
public void setWeights(Vector weights)
- Specified by:
setWeights
in interface NeuralNetworkTopology
getTopologyBuilder
public GenericTopologyBuilder getTopologyBuilder()
setTopologyBuilder
public void setTopologyBuilder(GenericTopologyBuilder topologyBuilder)
printRepresentation
public void printRepresentation()
setWeightInitialiser
public void setWeightInitialiser(GenericTopologyVisitor weightInitialiser)
Copyright © 2009 CIRG. All Rights Reserved.