Class YOLOV3.Builder
java.lang.Object
ai.djl.basicmodelzoo.cv.object_detection.yolo.YOLOV3.Builder
- Enclosing class:
- YOLOV3
The Builder to construct a
YOLOV3
object.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionai.djl.nn.Block
build()
Builds aYOLOV3
block.ai.djl.nn.Block
Builds aBlock
that represents the backbone of yolov3, which is called DarkNet53.optBatchNormMomentum
(float batchNormMomentum) Sets the momentum for batchNorm layer.optDarkNetOutSize
(int darkNetOutSize) Sets the out size of darkNet for testing.optLeakyAlpha
(float leakyAlpha) Sets the alpha for leakyRelu activation.setNumClasses
(int numClasses) Sets the number of classes for yolov3.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setNumClasses
Sets the number of classes for yolov3.- Parameters:
numClasses
- the number of classes- Returns:
- this
Builder
-
optBatchNormMomentum
Sets the momentum for batchNorm layer.- Parameters:
batchNormMomentum
- the momentum for batchNorm layer- Returns:
- this
Builder
-
optLeakyAlpha
Sets the alpha for leakyRelu activation.- Parameters:
leakyAlpha
- the alpha for leakyRelu activation- Returns:
- this
Builder
-
optDarkNetOutSize
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 aYOLOV3
block.- Returns:
- a
YOLOV3
block
-
buildDarkNet
public ai.djl.nn.Block buildDarkNet()Builds aBlock
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
-