Package ai.djl.training.loss
Class YOLOv3Loss.Builder
- java.lang.Object
-
- ai.djl.training.loss.YOLOv3Loss.Builder
-
- Enclosing class:
- YOLOv3Loss
public static class YOLOv3Loss.Builder extends java.lang.ObjectThe Builder to construct aYOLOv3Lossobject.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description YOLOv3Lossbuild()Builds aYOLOv3Lossinstance.YOLOv3Loss.BuilderoptIgnoreThreshold(float ignoreThreshold)Sets the ignoreThreshold for iou to check if we think it detects a picture.YOLOv3Loss.BuildersetAnchorsArray(float[] anchorsArray)Sets the preset anchors for YoloV3.YOLOv3Loss.BuildersetInputShape(Shape inputShape)Sets the shape of the input picture.YOLOv3Loss.BuildersetName(java.lang.String name)Sets the loss name of YoloV3Loss.YOLOv3Loss.BuildersetNumClasses(int numClasses)Sets the number of total classes.
-
-
-
Method Detail
-
setName
public YOLOv3Loss.Builder setName(java.lang.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 aYOLOv3Lossinstance.- Returns:
- a
YOLOv3Lossinstance.
-
-