public static class SingleShotDetection.Builder
extends java.lang.Object
SingleShotDetection.| Modifier and Type | Method and Description |
|---|---|
SingleShotDetection |
build()
Builds a
SingleShotDetection block. |
SingleShotDetection.Builder |
optFeatures(java.util.List<ai.djl.nn.Block> features)
Sets the
Conv2D blocks to be appended to the network to get multi-output network. |
SingleShotDetection.Builder |
optGlobalPool(boolean globalPool)
Sets the boolean whether to attach a global average pooling layer as the last output
layer.
|
SingleShotDetection.Builder |
setBaseNetwork(ai.djl.nn.Block network)
Sets the base network for the SSD framework.
|
SingleShotDetection.Builder |
setNumClasses(int numClasses)
Sets the number of classes of objects to be detected.
|
SingleShotDetection.Builder |
setNumFeatures(int numFeatures)
Sets the number of down sampling blocks to be applied.
|
SingleShotDetection.Builder |
setRatios(java.util.List<java.util.List<java.lang.Float>> ratios)
Sets the list of aspect ratios of generated anchor boxes.
|
SingleShotDetection.Builder |
setSizes(java.util.List<java.util.List<java.lang.Float>> sizes)
Sets the list of sizes of generated anchor boxes.
|
public SingleShotDetection.Builder setSizes(java.util.List<java.util.List<java.lang.Float>> sizes)
sizes - size of the inputpublic SingleShotDetection.Builder setRatios(java.util.List<java.util.List<java.lang.Float>> ratios)
ratios - size of the inputpublic SingleShotDetection.Builder setNumClasses(int numClasses)
numClasses - number of classespublic SingleShotDetection.Builder setBaseNetwork(ai.djl.nn.Block network)
network - Base networkpublic SingleShotDetection.Builder setNumFeatures(int numFeatures)
numFeatures - Number of down sampling blocks to be appliedpublic SingleShotDetection.Builder optFeatures(java.util.List<ai.djl.nn.Block> features)
Conv2D blocks to be appended to the network to get multi-output network.features - List of Conv2D blocks to be appendedpublic SingleShotDetection.Builder optGlobalPool(boolean globalPool)
globalPool - Whether to attach a global average pooling layer as the last output
layerpublic SingleShotDetection build()
SingleShotDetection block.SingleShotDetection block