Class Convolution3DUtils


  • public class Convolution3DUtils
    extends Object
    • Method Detail

      • get3DOutputSize

        public static int[] get3DOutputSize​(INDArray inputData,
                                            int[] kernel,
                                            int[] strides,
                                            int[] padding,
                                            ConvolutionMode convolutionMode,
                                            int[] dilation,
                                            boolean isNCDHW)
        Get the output size (depth/height/width) for the given input data and CNN3D configuration
        Parameters:
        inputData - Input data
        kernel - Kernel size (depth/height/width)
        strides - Strides (depth/height/width)
        padding - Padding (depth/height/width)
        convolutionMode - Convolution mode (Same, Strict, Truncate)
        dilation - Kernel dilation (depth/height/width)
        Returns:
        Output size: int[3] with output depth/height/width
      • get3DSameModeTopLeftPadding

        public static int[] get3DSameModeTopLeftPadding​(int[] outSize,
                                                        int[] inSize,
                                                        int[] kernel,
                                                        int[] strides,
                                                        int[] dilation)
        Get top and left padding for same mode only for 3d convolutions
        Parameters:
        outSize -
        inSize -
        kernel -
        strides -
        Returns:
      • validateCnn3DKernelStridePadding

        public static void validateCnn3DKernelStridePadding​(int[] kernelSize,
                                                            int[] stride,
                                                            int[] padding)
        Perform validation on the CNN3D layer kernel/stride/padding. Expect 3d int[], with values > 0 for kernel size and stride, and values >= 0 for padding.
        Parameters:
        kernelSize - Kernel size array to check
        stride - Stride array to check
        padding - Padding array to check
      • layerHasConvolution3DLayout

        public static boolean layerHasConvolution3DLayout​(Layer layer)
        Returns true if any of the layers are 3d convolution, pooling, or upsampling layers including: Convolution3D, Deconvolution3D, Subsampling3DLayer, Upsampling3D
        Parameters:
        layer - the input layer to validate
        Returns:
        true if the layer is any of the types specified.