public static int getOutputSize(INDArray inputData, int kernel, int strides, int padding,
                                    ConvolutionMode convolutionMode, int dilation) {
        // FIXME: int cast
        int inH = (int) inputData.size(2);
        int eKernel = effectiveKernelSize(kernel, dilation);
        boolean atrous = (eKernel == kernel);
        validateShapes(inputData, eKernel, strides, padding, convolutionMode, dilation, inH, atrous);

        if (convolutionMode == ConvolutionMode.Same) {
            int outH = (int) Math.ceil(inH / ((double) strides));
            return outH;
        }

        int outH = (inH - eKernel + 2 * padding) / strides + 1;
        return outH;
    }
public static int getOutputSize ( INDArray inputData , int kernel , int strides , int padding , ConvolutionMode convolutionMode , int dilation ) { int inH = ( int ) inputData . size ( 2 ) ; int eKernel = effectiveKernelSize ( kernel , dilation ) ; boolean atrous = ( eKernel == kernel ) ; validateShapes ( inputData , eKernel , strides , padding , convolutionMode , dilation , inH , atrous ) ; if ( convolutionMode == ConvolutionMode . Same ) { int outH = ( int ) Math . ceil ( inH / ( ( double ) strides ) ) ; return outH ; } int outH = ( inH - eKernel + 2 * padding ) / strides + 1 ; return outH ; }
Get the output size (height) for the given input data and CNN1D configuration

@param inputData       Input data
@param kernel          Kernel size
@param strides         Stride
@param padding         Padding
@param convolutionMode Convolution mode (Same, Strict, Truncate)
@param dilation        Kernel dilation
@return Output size (width)