Class SubsamplingLayer.BaseSubsamplingBuilder<T extends SubsamplingLayer.BaseSubsamplingBuilder<T>>

    • Field Detail

      • kernelSize

        protected int[] kernelSize
      • stride

        protected int[] stride
      • padding

        protected int[] padding
      • convolutionMode

        protected ConvolutionMode convolutionMode
        Set the convolution mode for the Convolution layer. See ConvolutionMode for more details Convolution mode for layer
      • pnorm

        protected int pnorm
      • eps

        protected double eps
      • cudnnAllowFallback

        protected boolean cudnnAllowFallback
        When using CuDNN and an error is encountered, should fallback to the non-CuDNN implementatation be allowed? If set to false, an exception in CuDNN will be propagated back to the user. If false, the built-in (non-CuDNN) implementation for ConvolutionLayer will be used Whether fallback to non-CuDNN implementation should be used
      • avgPoolIncludePadInDivisor

        protected boolean avgPoolIncludePadInDivisor
      • cnn2DFormat

        protected CNN2DFormat cnn2DFormat
        Configure the 2d data format
    • Constructor Detail

      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(SubsamplingLayer.PoolingType poolingType,
                                         int[] kernelSize,
                                         int[] stride,
                                         int[] padding)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(PoolingType poolingType,
                                         int[] kernelSize)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(PoolingType poolingType,
                                         int[] kernelSize,
                                         int[] stride,
                                         int[] padding)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(int[] kernelSize,
                                         int[] stride,
                                         int[] padding)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(int[] kernelSize,
                                         int[] stride)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(int... kernelSize)
      • BaseSubsamplingBuilder

        protected BaseSubsamplingBuilder​(PoolingType poolingType)
    • Method Detail

      • setPnorm

        public void setPnorm​(int pnorm)
      • setEps

        public void setEps​(double eps)
      • allowCausal

        protected abstract boolean allowCausal()
      • setConvolutionMode

        public void setConvolutionMode​(ConvolutionMode convolutionMode)
      • dataFormat

        public T dataFormat​(CNN2DFormat cnn2DFormat)
        Set the data format for the CNN activations - NCHW (channels first) or NHWC (channels last). See CNN2DFormat for more details.
        Default: NCHW
        Parameters:
        cnn2DFormat - Format for activations (in and out)
      • convolutionMode

        public T convolutionMode​(ConvolutionMode convolutionMode)
        Set the convolution mode for the Convolution layer. See ConvolutionMode for more details
        Parameters:
        convolutionMode - Convolution mode for layer
      • poolingType

        public T poolingType​(PoolingType poolingType)
      • pnorm

        public T pnorm​(int pnorm)
      • eps

        public T eps​(double eps)
      • cudnnAllowFallback

        @Deprecated
        public T cudnnAllowFallback​(boolean allowFallback)
        When using CuDNN or MKLDNN and an error is encountered, should fallback to the non-helper implementation be allowed? If set to false, an exception in the helper will be propagated back to the user. If true, the built-in (non-MKL/CuDNN) implementation for ConvolutionLayer will be used
        Parameters:
        allowFallback - Whether fallback to non-CuDNN implementation should be used
      • helperAllowFallback

        public T helperAllowFallback​(boolean allowFallback)
        When using CuDNN or MKLDNN and an error is encountered, should fallback to the non-helper implementation be allowed? If set to false, an exception in the helper will be propagated back to the user. If true, the built-in (non-MKL/CuDNN) implementation for SubsamplingLayer will be used
        Parameters:
        allowFallback - Whether fallback to non-CuDNN implementation should be used
      • avgPoolIncludePadInDivisor

        public T avgPoolIncludePadInDivisor​(boolean avgPoolIncludePadInDivisor)
        When doing average pooling, should the padding values be included in the divisor or not?
        Not applicable for max and p-norm pooling.
        Users should not usually set this - instead, leave it as the default (false). It is included mainly for backward compatibility of older models
        Consider the following 2x2 segment along the right side of the image:
         [A, P]
         [B, P]
         
        Where A and B are actual values, and P is padding (0).
        With avgPoolIncludePadInDivisor = true, we have: out = (A+B+0+0)/4
        With avgPoolIncludePadInDivisor = false, we have: out = (A+B+0+0)/2

        Earlier versions of DL4J originally included padding in the count, newer versions exclude it.
        Parameters:
        avgPoolIncludePadInDivisor - Whether the divisor should include or exclude padding for average pooling