Class VGG.Builder

  • Enclosing class:
    VGG

    public static final class VGG.Builder
    extends java.lang.Object
    The Builder to construct a VGG object.
    • Constructor Summary

      Constructors 
      Constructor Description
      Builder()  
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • setNumLayers

        public VGG.Builder setNumLayers​(int numLayers)
        Sets the number of layers. It is equal to total sum of numConvs in convArch + 3.
        Parameters:
        numLayers - the number of layers in the network. default is 11.
        Returns:
        this Builder
      • setConvArch

        public VGG.Builder setConvArch​(int[][] convArch)
        Sets the number of blocks according to the user. It can be of multiple types, VGG-11, VGG-13, VGG-16, VGG-19.
        Parameters:
        convArch - 2-D array consisting of number of convolutions and the number of channels.
        Returns:
        this Builder
      • setOutSize

        public VGG.Builder setOutSize​(long outSize)
        Sets the size of the output.
        Parameters:
        outSize - the output size
        Returns:
        this Builder
      • build

        public ai.djl.nn.Block build()
        Builds a VGG block.
        Returns:
        the VGG block