src/main/java/convnet/CNN.java
/**
     * Logic for a convolutional layer.
     *
     * @param layer
     */
Logic for a convolutional layer.
@param layer
Logic for a convolutional layer . @param layer
private void execConvolutionalLayer(Layer layer) {
        Data layerOutput = new Data();
        for (int i = 0; i < layer.getKernelsLength(); i++) {
            Data kernel = layer.getKernelByIndex(i);
            double bias = layer.getBiasByIndex(i);
            Data input = layer.getLayerInput();
            Data activationMap = this.evalValidConvolution(input, kernel, bias);
            layerOutput.stackMap(activationMap.read2d());
        }
        layer.setLayerOutput(layerOutput);
    }
private void execConvolutionalLayer ( Layer layer ) { Data layerOutput = new Data ( ) ; for ( int i = 0 ; i < layer . getKernelsLength ( ) ; i ++ ) { Data kernel = layer . getKernelByIndex ( i ) ; double bias = layer . getBiasByIndex ( i ) ; Data input = layer . getLayerInput ( ) ; Data activationMap = this . evalValidConvolution ( input , kernel , bias ) ; layerOutput . stackMap ( activationMap . read2d ( ) ) ; } layer . setLayerOutput ( layerOutput ) ; }
Logic for a convolutional layer.
Logic for a convolutional layer .