src/core/layer/convolutional/AbstractPoolingLayer.java
public void initializeDimensions() throws NeuralNetworkException {
        previousLayerWidth = getPreviousLayerWidth();
        previousLayerHeight = getPreviousLayerHeight();
        previousLayerDepth = getPreviousLayerDepth();

        if ((previousLayerWidth - filterRowSize) % stride != 0)  throw new NeuralNetworkException("Pooling layer widthIn: " + previousLayerWidth + " - filterRowSize: " + filterRowSize + " must be divisible by stride: " + stride);
        if ((previousLayerHeight - filterColumnSize) % stride != 0)  throw new NeuralNetworkException("Pooling layer heightIn: " + previousLayerHeight + " - filterColumnSize: " + filterColumnSize + " must be divisible by stride: " + stride);

        layerWidth = ((previousLayerWidth - filterRowSize) / stride) + 1;
        layerHeight = ((previousLayerHeight - filterColumnSize) / stride) + 1;

        if (layerWidth < 1) throw new NeuralNetworkException("Pooling layer width cannot be less than 1: " + layerWidth);
        if (layerHeight < 1) throw new NeuralNetworkException("Pooling layer height cannot be less than 1: " + layerHeight);
        if (previousLayerDepth < 1) throw new NeuralNetworkException("Pooling layer depth cannot be less than 1: " + previousLayerDepth);

        setLayerWidth(layerWidth);
        setLayerHeight(layerHeight);
        setLayerDepth(previousLayerDepth);
    }
/**
     * Initializes neural network layer dimensions.
     *
     * @throws NeuralNetworkException thrown if initialization of layer fails.
     */
Initializes neural network layer dimensions.

@throws NeuralNetworkException thrown if initialization of layer fails.
Initializes neural network layer dimensions . @throws NeuralNetworkException thrown if initialization of layer fails .
public void initializeDimensions() throws NeuralNetworkException {
        previousLayerWidth = getPreviousLayerWidth();
        previousLayerHeight = getPreviousLayerHeight();
        previousLayerDepth = getPreviousLayerDepth();
        if ((previousLayerWidth - filterRowSize) % stride != 0)  throw new NeuralNetworkException("Pooling layer widthIn: " + previousLayerWidth + " - filterRowSize: " + filterRowSize + " must be divisible by stride: " + stride);
        if ((previousLayerHeight - filterColumnSize) % stride != 0)  throw new NeuralNetworkException("Pooling layer heightIn: " + previousLayerHeight + " - filterColumnSize: " + filterColumnSize + " must be divisible by stride: " + stride);
        layerWidth = ((previousLayerWidth - filterRowSize) / stride) + 1;
        layerHeight = ((previousLayerHeight - filterColumnSize) / stride) + 1;
        if (layerWidth < 1) throw new NeuralNetworkException("Pooling layer width cannot be less than 1: " + layerWidth);
        if (layerHeight < 1) throw new NeuralNetworkException("Pooling layer height cannot be less than 1: " + layerHeight);
        if (previousLayerDepth < 1) throw new NeuralNetworkException("Pooling layer depth cannot be less than 1: " + previousLayerDepth);
        setLayerWidth(layerWidth);
        setLayerHeight(layerHeight);
        setLayerDepth(previousLayerDepth);
    }
public void initializeDimensions ( ) throws NeuralNetworkException { previousLayerWidth = getPreviousLayerWidth ( ) ; previousLayerHeight = getPreviousLayerHeight ( ) ; previousLayerDepth = getPreviousLayerDepth ( ) ; if ( ( previousLayerWidth - filterRowSize ) % stride != 0 ) throw new NeuralNetworkException ( "Pooling layer widthIn: " + previousLayerWidth + " - filterRowSize: " + filterRowSize + " must be divisible by stride: " + stride ) ; if ( ( previousLayerHeight - filterColumnSize ) % stride != 0 ) throw new NeuralNetworkException ( "Pooling layer heightIn: " + previousLayerHeight + " - filterColumnSize: " + filterColumnSize + " must be divisible by stride: " + stride ) ; layerWidth = ( ( previousLayerWidth - filterRowSize ) / stride ) + 1 ; layerHeight = ( ( previousLayerHeight - filterColumnSize ) / stride ) + 1 ; if ( layerWidth < 1 ) throw new NeuralNetworkException ( "Pooling layer width cannot be less than 1: " + layerWidth ) ; if ( layerHeight < 1 ) throw new NeuralNetworkException ( "Pooling layer height cannot be less than 1: " + layerHeight ) ; if ( previousLayerDepth < 1 ) throw new NeuralNetworkException ( "Pooling layer depth cannot be less than 1: " + previousLayerDepth ) ; setLayerWidth ( layerWidth ) ; setLayerHeight ( layerHeight ) ; setLayerDepth ( previousLayerDepth ) ; }
Initializes neural network layer dimensions.
Initializes neural network layer dimensions .