Class YOLOV3.Builder
- java.lang.Object
-
- ai.djl.basicmodelzoo.cv.object_detection.yolo.YOLOV3.Builder
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ai.djl.nn.Block
build()
Builds aYOLOV3
block.ai.djl.nn.Block
buildDarkNet()
Builds aBlock
that represents the backbone of yolov3, which is called DarkNet53.YOLOV3.Builder
optBatchNormMomentum(float batchNormMomentum)
Sets the momentum for batchNorm layer.YOLOV3.Builder
optDarkNetOutSize(int darkNetOutSize)
Sets the out size of darkNet for testing.YOLOV3.Builder
optLeakyAlpha(float leakyAlpha)
Sets the alpha for leakyRelu activation.YOLOV3.Builder
setNumClasses(int numClasses)
Sets the number of classes for yolov3.
-
-
-
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
-
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
-
-