Class Yolo2OutputLayer.Builder
- java.lang.Object
-
- org.deeplearning4j.nn.conf.layers.Layer.Builder<Yolo2OutputLayer.Builder>
-
- org.deeplearning4j.nn.conf.layers.objdetect.Yolo2OutputLayer.Builder
-
- Enclosing class:
- Yolo2OutputLayer
public static class Yolo2OutputLayer.Builder extends Layer.Builder<Yolo2OutputLayer.Builder>
-
-
Field Summary
-
Fields inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
allParamConstraints, biasConstraints, iDropout, layerName, weightConstraints
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Yolo2OutputLayer.Builder
boundingBoxPriors(INDArray boundingBoxes)
Bounding box priors dimensions [width, height].Yolo2OutputLayer
build()
Yolo2OutputLayer.Builder
lambdaCoord(double lambdaCoord)
Loss function coefficient for position and size/scale components of the loss function.Yolo2OutputLayer.Builder
lambdaNoObj(double lambdaNoObj)
Loss function coefficient for the "no object confidence" components of the loss function.Yolo2OutputLayer.Builder
lossClassPredictions(ILossFunction lossClassPredictions)
Loss function for the class predictions - defaults to L2 loss (i.e., sum of squared errors, as per the paper), however Loss MCXENT could also be used (which is more common for classification).Yolo2OutputLayer.Builder
lossPositionScale(ILossFunction lossPositionScale)
Loss function for position/scale component of the loss function-
Methods inherited from class org.deeplearning4j.nn.conf.layers.Layer.Builder
constrainAllParameters, constrainBias, constrainWeights, dropOut, dropOut, name
-
-
-
-
Method Detail
-
lambdaCoord
public Yolo2OutputLayer.Builder lambdaCoord(double lambdaCoord)
Loss function coefficient for position and size/scale components of the loss function. Default (as per paper): 5- Parameters:
lambdaCoord
- Lambda value for size/scale component of loss function
-
lambdaNoObj
public Yolo2OutputLayer.Builder lambdaNoObj(double lambdaNoObj)
Loss function coefficient for the "no object confidence" components of the loss function. Default (as per paper): 0.5- Parameters:
lambdaNoObj
- Lambda value for no-object (confidence) component of the loss function
-
lossPositionScale
public Yolo2OutputLayer.Builder lossPositionScale(ILossFunction lossPositionScale)
Loss function for position/scale component of the loss function- Parameters:
lossPositionScale
- Loss function for position/scale
-
lossClassPredictions
public Yolo2OutputLayer.Builder lossClassPredictions(ILossFunction lossClassPredictions)
Loss function for the class predictions - defaults to L2 loss (i.e., sum of squared errors, as per the paper), however Loss MCXENT could also be used (which is more common for classification).- Parameters:
lossClassPredictions
- Loss function for the class prediction error component of the YOLO loss function
-
boundingBoxPriors
public Yolo2OutputLayer.Builder boundingBoxPriors(INDArray boundingBoxes)
Bounding box priors dimensions [width, height]. For N bounding boxes, input has shape [rows, columns] = [N, 2] Note that dimensions should be specified as fraction of grid size. For example, a network with 13x13 output, a value of 1.0 would correspond to one grid cell; a value of 13 would correspond to the entire image.- Parameters:
boundingBoxes
- Bounding box prior dimensions (width, height)
-
build
public Yolo2OutputLayer build()
- Specified by:
build
in classLayer.Builder<Yolo2OutputLayer.Builder>
-
-