Package ai.djl.training.loss
Class YOLOv3Loss.Builder
java.lang.Object
ai.djl.training.loss.YOLOv3Loss.Builder
- Enclosing class:
- YOLOv3Loss
The Builder to construct a
YOLOv3Loss object.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aYOLOv3Lossinstance.optIgnoreThreshold(float ignoreThreshold) Sets the ignoreThreshold for iou to check if we think it detects a picture.setAnchorsArray(float[] anchorsArray) Sets the preset anchors for YoloV3.setInputShape(Shape inputShape) Sets the shape of the input picture.Sets the loss name of YoloV3Loss.setNumClasses(int numClasses) Sets the number of total classes.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setName
Sets the loss name of YoloV3Loss.- Parameters:
name- the name of loss function- Returns:
- this
Builder
-
setAnchorsArray
Sets the preset anchors for YoloV3.- Parameters:
anchorsArray- the anchors in float array- Returns:
- this
Builder
-
setNumClasses
Sets the number of total classes.- Parameters:
numClasses- the number of total classes- Returns:
- this
Builder
-
setInputShape
Sets the shape of the input picture.- Parameters:
inputShape- the shape of input picture.- Returns:
- this
Builder
-
optIgnoreThreshold
Sets the ignoreThreshold for iou to check if we think it detects a picture.- Parameters:
ignoreThreshold- the ignore threshold- Returns:
- this
Builder
-
build
Builds aYOLOv3Lossinstance.- Returns:
- a
YOLOv3Lossinstance.
-