Class ZeroPaddingLayer.Builder

    • Constructor Detail

      • Builder

        public Builder​(int padHeight,
                       int padWidth)
        Parameters:
        padHeight - Padding for both the top and bottom
        padWidth - Padding for both the left and right
      • Builder

        public Builder​(int padTop,
                       int padBottom,
                       int padLeft,
                       int padRight)
        Parameters:
        padTop - Top padding value
        padBottom - Bottom padding value
        padLeft - Left padding value
        padRight - Right padding value
      • Builder

        public Builder​(int[] padding)
        Parameters:
        padding - Must be a length 1 array with values [paddingAll], a length 2 array with values [padTopBottom, padLeftRight], or a length 4 array with values [padTop, padBottom, padLeft, padRight]
    • Method Detail

      • dataFormat

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

        public void setPadding​(int... padding)
        Parameters:
        padding - Padding value for top, bottom, left, and right. Must be length 4 array