Class YOLOV3.Builder

  • Enclosing class:
    YOLOV3

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

      • Builder

        public Builder()
    • Method Detail

      • setNumClasses

        public YOLOV3.Builder setNumClasses​(int numClasses)
        Sets the number of classes for yolov3.
        Parameters:
        numClasses - the number of classes
        Returns:
        this Builder
      • optBatchNormMomentum

        public YOLOV3.Builder optBatchNormMomentum​(float batchNormMomentum)
        Sets the momentum for batchNorm layer.
        Parameters:
        batchNormMomentum - the momentum for batchNorm layer
        Returns:
        this Builder
      • optLeakyAlpha

        public YOLOV3.Builder optLeakyAlpha​(float leakyAlpha)
        Sets the alpha for leakyRelu activation.
        Parameters:
        leakyAlpha - the alpha for leakyRelu activation
        Returns:
        this Builder
      • optDarkNetOutSize

        public YOLOV3.Builder optDarkNetOutSize​(int darkNetOutSize)
        Sets the out size of darkNet for testing.
        Parameters:
        darkNetOutSize - the out size of darkNet
        Returns:
        this Builder
      • build

        public ai.djl.nn.Block build()
        Builds a YOLOV3 block.
        Returns:
        a YOLOV3 block
      • buildDarkNet

        public ai.djl.nn.Block buildDarkNet()
        Builds a Block that represents the backbone of yolov3, which is called DarkNet53. This can be used for testing and transfer learning.
        Returns:
        a Block that represents darkNet53