org.neuroph.nnet.comp.layer
Class FeatureMapsLayer
- java.lang.Object
-
- org.neuroph.core.Layer
-
- org.neuroph.nnet.comp.layer.FeatureMapsLayer
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<Neuron>
- Direct Known Subclasses:
- ConvolutionalLayer, InputMapsLayer, PoolingLayer
public abstract class FeatureMapsLayer extends Layer
This class represents an array of feature maps which are 2 dimensional layers (Layer2D instances) and it is base class for Convolution and Pooling layers, which are used in ConvolutionalNetwork
-
-
Constructor Summary
Constructors Constructor and Description FeatureMapsLayer()Creates a new empty feature maps layer with specified kernelFeatureMapsLayer(Dimension2D mapDimensions)Creates a new empty feature maps layer with specified kernel and feature map dimensions.FeatureMapsLayer(Dimension2D kernelDimension, Dimension2D mapDimensions, int mapCount, NeuronProperties neuronProp)Creates new feature maps layer with specified kernel and feature maps.FeatureMapsLayer(Dimension2D mapDimensions, int mapCount, NeuronProperties neuronProp)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description voidaddFeatureMap(FeatureMapLayer featureMap)Adds a feature map (2d layer) to this feature map layerabstract voidconnectMaps(FeatureMapLayer fromMap, FeatureMapLayer toMap)Creates connections between two feature maps.FeatureMapLayergetFeatureMap(int index)Returns feature map (Layer2D) at specified indexjava.util.List<FeatureMapLayer>getFeatureMaps()Dimension2DgetMapDimensions()Returns dimensions of feature maps in this layerNeurongetNeuronAt(int x, int y, int mapIndex)Returns neuron instance at specified (x, y) position at specified feature map layerintgetNeuronsCount()Returns total number of neurons in all feature mapsintgetNumberOfMaps()Returns number of feature maps in this layer-
Methods inherited from class org.neuroph.core.Layer
addNeuron, addNeuron, calculate, getLabel, getNeuronAt, getNeurons, getParentNetwork, indexOf, initializeWeights, isEmpty, iterator, removeAllNeurons, removeNeuron, removeNeuronAt, reset, setLabel, setNeuron, setParentNetwork
-
-
-
-
Constructor Detail
-
FeatureMapsLayer
public FeatureMapsLayer()
Creates a new empty feature maps layer with specified kernel- Parameters:
kernel- kernel to use for all feature maps
-
FeatureMapsLayer
public FeatureMapsLayer(Dimension2D mapDimensions)
Creates a new empty feature maps layer with specified kernel and feature map dimensions.- Parameters:
kernel- kernel used for all feature maps in this layermapDimensions- mapDimensions of feature maps in this layer
-
FeatureMapsLayer
public FeatureMapsLayer(Dimension2D kernelDimension, Dimension2D mapDimensions, int mapCount, NeuronProperties neuronProp)
Creates new feature maps layer with specified kernel and feature maps. Also creates feature maps and neurons in feature maps;- Parameters:
kernel- kernel used for all feature maps in this layermapDimensions- mapDimensions of feature maps in this layermapCount- number of feature mapsneuronProp- properties for neurons in feature maps
-
FeatureMapsLayer
public FeatureMapsLayer(Dimension2D mapDimensions, int mapCount, NeuronProperties neuronProp)
-
-
Method Detail
-
getFeatureMaps
public java.util.List<FeatureMapLayer> getFeatureMaps()
-
addFeatureMap
public void addFeatureMap(FeatureMapLayer featureMap)
Adds a feature map (2d layer) to this feature map layer- Parameters:
featureMap- feature map to add
-
getFeatureMap
public FeatureMapLayer getFeatureMap(int index)
Returns feature map (Layer2D) at specified index- Parameters:
index- index of feature map- Returns:
- feature map (Layer2D instance) at specified index
-
getNumberOfMaps
public int getNumberOfMaps()
Returns number of feature maps in this layer- Returns:
- number of feature maps in this layer
-
getNeuronAt
public Neuron getNeuronAt(int x, int y, int mapIndex)
Returns neuron instance at specified (x, y) position at specified feature map layer- Parameters:
x- neuron's x positiony- neuron's y positionmapIndex- feature map index- Returns:
- neuron at specified (x, y, map) position
-
getNeuronsCount
public int getNeuronsCount()
Returns total number of neurons in all feature maps- Overrides:
getNeuronsCountin classLayer- Returns:
- total number of neurons in all feature maps
-
getMapDimensions
public Dimension2D getMapDimensions()
Returns dimensions of feature maps in this layer- Returns:
- dimensions of feature maps in this layer
-
connectMaps
public abstract void connectMaps(FeatureMapLayer fromMap, FeatureMapLayer toMap)
Creates connections between two feature maps. It does nothing here, connectivity patterns are defined by subclasses... Maybe it should be even removed from here or made abstract......- Parameters:
fromMap-toMap-
-
-
DMelt 3.0 © DataMelt by jWork.ORG