org.neuroph.nnet.comp.layer
Class ConvolutionalLayer
- java.lang.Object
-
- org.neuroph.core.Layer
-
- org.neuroph.nnet.comp.layer.FeatureMapsLayer
-
- org.neuroph.nnet.comp.layer.ConvolutionalLayer
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<Neuron>
public class ConvolutionalLayer extends FeatureMapsLayer
Convolutional layer is a special type of layer, used in convolutional neural networks. It contains a collection of feature maps, default neuron settings for convolutional layers, and method for creating connections to feature maps. The role of the convolutional layer is extaction of high level features.- See Also:
FeatureMapsLayer, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static NeuronPropertiesDEFAULT_NEURON_PROPDefault neuron properties for convolutional layer
-
Constructor Summary
Constructors Constructor and Description ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps)Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with default neuron settings for convolutional layer.ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps, java.lang.Class<? extends TransferFunction> transferFunction)Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with default neuron settings for convolutional layer.ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps, NeuronProperties neuronProp)Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with given neuron properties.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidconnectMaps(FeatureMapLayer fromMap, FeatureMapLayer toMap)Creates connections with shared weights between two feature maps Assumes that toMap is from Convolutional layer.-
Methods inherited from class org.neuroph.nnet.comp.layer.FeatureMapsLayer
addFeatureMap, getFeatureMap, getFeatureMaps, getMapDimensions, getNeuronAt, getNeuronsCount, getNumberOfMaps
-
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
-
-
-
-
Field Detail
-
DEFAULT_NEURON_PROP
public static final NeuronProperties DEFAULT_NEURON_PROP
Default neuron properties for convolutional layer
-
-
Constructor Detail
-
ConvolutionalLayer
public ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps)
Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with default neuron settings for convolutional layer.- Parameters:
fromLayer- previous layer, which will be connected to this layerkernel- kernel for all feature mapsnumberOfMaps- number of feature maps to create in this layer
-
ConvolutionalLayer
public ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps, java.lang.Class<? extends TransferFunction> transferFunction)
Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with default neuron settings for convolutional layer.- Parameters:
fromLayer- previous layer, which will be connected to this layerkernel- kernel for all feature mapsnumberOfMaps- number of feature maps to create in this layertransferFunction- neuron's transfer function to use
-
ConvolutionalLayer
public ConvolutionalLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDimension, int numberOfMaps, NeuronProperties neuronProp)
Creates convolutional layer with specified kernel, appropriate map dimensions in regard to previous layer (fromLayer param) and specified number of feature maps with given neuron properties.- Parameters:
fromLayer- previous layer, which will be connected to this layerkernel- kernel for all feature mapsnumberOfMaps- number of feature maps to create in this layerneuronProp- settings for neurons in feature maps
-
-
Method Detail
-
connectMaps
public void connectMaps(FeatureMapLayer fromMap, FeatureMapLayer toMap)
Creates connections with shared weights between two feature maps Assumes that toMap is from Convolutional layer. Kernel is used as a sliding window, and kernel positions overlap. Kernel is shifting right by one position at a time. Neurons at the same kernel position share the same weights- Specified by:
connectMapsin classFeatureMapsLayer- Parameters:
fromMap- source feature maptoMap- destination feature map
-
-
DMelt 3.0 © DataMelt by jWork.ORG