-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
Dear developer team,
I think your PoolingLayer constructor is having a bug in line 90.
public PoolingLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDim, int numberOfMaps, NeuronProperties neuronProp) {
this.kernel = this.kernel;
Instead it should be
this.kernel = new Kernel(kernelDim);
like in the constructor above.
I also suggest that one constructor calls the other one giving the default parameters for better maintenance. Something like:
public PoolingLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDim) {
int numberOfMaps = fromLayer.getNumberOfMaps();
this (fromLayer, kernelDim, numberOfMaps, DEFAULT_NEURON_PROP);
}
public PoolingLayer(FeatureMapsLayer fromLayer, Dimension2D kernelDim, int numberOfMaps, NeuronProperties neuronProp) {
this.kernel = new Kernel(kernelDim);
Dimension2D fromDimension = fromLayer.getMapDimensions();
int mapWidth = fromDimension.getWidth() / this.kernel.getWidth();
int mapHeight = fromDimension.getHeight() / this.kernel.getHeight();
this.mapDimensions = new Dimension2D(mapWidth, mapHeight);
this.createFeatureMaps(numberOfMaps, this.mapDimensions, kernelDim, neuronProp);
}
Best regards
Thilo Nietzschmann
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels