Class YOLOv3Loss.Builder

java.lang.Object
ai.djl.training.loss.YOLOv3Loss.Builder
Enclosing class:
YOLOv3Loss

public static class YOLOv3Loss.Builder extends Object
The Builder to construct a YOLOv3Loss object.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • setName

      public YOLOv3Loss.Builder setName(String name)
      Sets the loss name of YoloV3Loss.
      Parameters:
      name - the name of loss function
      Returns:
      this Builder
    • setAnchorsArray

      public YOLOv3Loss.Builder setAnchorsArray(float[] anchorsArray)
      Sets the preset anchors for YoloV3.
      Parameters:
      anchorsArray - the anchors in float array
      Returns:
      this Builder
    • setNumClasses

      public YOLOv3Loss.Builder setNumClasses(int numClasses)
      Sets the number of total classes.
      Parameters:
      numClasses - the number of total classes
      Returns:
      this Builder
    • setInputShape

      public YOLOv3Loss.Builder setInputShape(Shape inputShape)
      Sets the shape of the input picture.
      Parameters:
      inputShape - the shape of input picture.
      Returns:
      this Builder
    • optIgnoreThreshold

      public YOLOv3Loss.Builder optIgnoreThreshold(float ignoreThreshold)
      Sets the ignoreThreshold for iou to check if we think it detects a picture.
      Parameters:
      ignoreThreshold - the ignore threshold
      Returns:
      this Builder
    • build

      public YOLOv3Loss build()
      Builds a YOLOv3Loss instance.
      Returns:
      a YOLOv3Loss instance.