Class OldConvolution


  • public class OldConvolution
    extends Object
    • Method Detail

      • col2im

        public static INDArray col2im​(INDArray col,
                                      int[] stride,
                                      int[] padding,
                                      int height,
                                      int width)
        Parameters:
        col -
        stride -
        padding -
        height -
        width -
        Returns:
      • col2im

        public static INDArray col2im​(INDArray col,
                                      int sy,
                                      int sx,
                                      int ph,
                                      int pw,
                                      int h,
                                      int w)
        Rearrange matrix columns into blocks
        Parameters:
        col - the column transposed image to convert
        sy - stride y
        sx - stride x
        ph - padding height
        pw - padding width
        h - height
        w - width
        Returns:
      • im2col

        public static INDArray im2col​(INDArray img,
                                      int[] kernel,
                                      int[] stride,
                                      int[] padding)
        Parameters:
        img -
        kernel -
        stride -
        padding -
        Returns:
      • im2col

        public static INDArray im2col​(INDArray img,
                                      int kh,
                                      int kw,
                                      int sy,
                                      int sx,
                                      int ph,
                                      int pw,
                                      int pval,
                                      boolean coverAll)
        Implement column formatted images
        Parameters:
        img - the image to process
        kh - the kernel height
        kw - the kernel width
        sy - the stride along y
        sx - the stride along x
        ph - the padding width
        pw - the padding height
        pval - the padding value
        coverAll - whether to cover the whole image or not
        Returns:
        the column formatted image
      • outSize

        public static int outSize​(int size,
                                  int k,
                                  int s,
                                  int p,
                                  boolean coverAll)
        The out size for a convolution
        Parameters:
        size -
        k -
        s -
        p -
        coverAll -
        Returns:
      • outSize

        public static long outSize​(long size,
                                   long k,
                                   long s,
                                   long p,
                                   boolean coverAll)