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()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ai.djl.nn.Block build()
      Builds a VGG block.
      VGG.Builder setConvArch​(int[][] convArch)
      Sets the number of blocks according to the user.
      VGG.Builder setNumLayers​(int numLayers)
      Sets the number of layers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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
      • build

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