Class LocallyConnected2D.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setKernel

        public void setKernel​(int... kernel)
        Parameters:
        kernel - Kernel size for the layer. Must be 2 values (height/width)
      • setStride

        public void setStride​(int... stride)
        Parameters:
        stride - Stride for the layer. Must be 2 values (height/width)
      • setPadding

        public void setPadding​(int... padding)
        Parameters:
        padding - Padding for the layer. Not used if ConvolutionMode.Same is set. Must be 2 values (height/width)
      • setDilation

        public void setDilation​(int... dilation)
        Parameters:
        dilation - Dilation for the layer. Must be 2 values (height/width)
      • kernelSize

        public LocallyConnected2D.Builder kernelSize​(int... k)
        Parameters:
        k - Kernel size for the layer. Must be 2 values (height/width)
      • stride

        public LocallyConnected2D.Builder stride​(int... s)
        Parameters:
        s - Stride for the layer. Must be 2 values (height/width)
      • dilation

        public LocallyConnected2D.Builder dilation​(int... d)
        Parameters:
        d - Dilation for the layer. Must be 2 values (height/width)
      • dataFormat

        public LocallyConnected2D.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)
      • hasBias

        public LocallyConnected2D.Builder hasBias​(boolean hasBias)
        Parameters:
        hasBias - If true (default is false) the layer will have a bias
      • setInputSize

        public LocallyConnected2D.Builder setInputSize​(int... inputSize)
        Set input filter size (h,w) for this locally connected 2D layer
        Parameters:
        inputSize - pair of height and width of the input filters to this layer
        Returns:
        Builder