Class VGG


  • public final class VGG
    extends java.lang.Object
    VGG model from the "Very Deep Convolutional Networks for Large-Scale Image Recognition" https://arxiv.org/abs/1409.1556 paper.
    See Also:
    The D2L chapter on VGG
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  VGG.Builder
      The Builder to construct a VGG object.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static VGG.Builder builder()
      Creates a builder to build a VGG.
      static ai.djl.nn.Block vgg​(VGG.Builder builder)
      Creates a VGG block with the help of the VGG Builder.
      ai.djl.nn.SequentialBlock vggBlock​(int numConvs, int numChannels)
      Creates a constituent VGG block that becomes a part of the whole VGG model.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • vgg

        public static ai.djl.nn.Block vgg​(VGG.Builder builder)
        Creates a VGG block with the help of the VGG Builder.
        Parameters:
        builder - the VGG.Builder with the necessary arguments
        Returns:
        a VGG block.
      • vggBlock

        public ai.djl.nn.SequentialBlock vggBlock​(int numConvs,
                                                  int numChannels)
        Creates a constituent VGG block that becomes a part of the whole VGG model.
        Parameters:
        numConvs - Numbers of layers in each feature block.
        numChannels - Numbers of filters in each feature block. List length should match the layers.
        Returns:
        a constituent vgg block.
      • builder

        public static VGG.Builder builder()
        Creates a builder to build a VGG.
        Returns:
        a new builder