public static int [ ] getDeconvolutionOutputSize ( INDArray inputData , int [ ] kernel , int [ ] strides , int [ ] padding , ConvolutionMode convolutionMode , int [ ] dilation ) { // FIXME: int cast int hIn = ( int ) inputData . size ( 2 ) ; int wIn = ( int ) inputData . size ( 3 ) ; int [ ] eKernel = effectiveKernelSize ( kernel , dilation ) ; if ( convolutionMode == ConvolutionMode . Same ) { int hOut = strides [ 0 ] * hIn ; int wOut = strides [ 1 ] * wIn ; return new int [ ] { hOut , wOut } ; } int hOut = strides [ 0 ] * ( hIn - 1 ) + eKernel [ 0 ] - 2 * padding [ 0 ] ; int wOut = strides [ 1 ] * ( wIn - 1 ) + eKernel [ 1 ] - 2 * padding [ 1 ] ; return new int [ ] { hOut , wOut } ; }
Get the output size of a deconvolution operation for given input data . In deconvolution we compute the inverse of the shape computation of a convolution .