Class ResNetV1.Builder
java.lang.Object
ai.djl.basicmodelzoo.cv.classification.ResNetV1.Builder
- Enclosing class:
- ResNetV1
The Builder to construct a
ResNetV1 object.-
Method Summary
Modifier and TypeMethodDescriptionai.djl.nn.SequentialBlockbuild()Builds aResNetV1block.optBatchNormMomentum(float batchNormMomentum) Sets the momentum of batchNorm layer.setImageShape(ai.djl.ndarray.types.Shape imageShape) Sets the shape of the image.setNumLayers(int numLayers) Sets the number of layers in the network.setOutSize(long outSize) Sets the size of the output.
-
Method Details
-
setNumLayers
Sets the number of layers in the network.- Parameters:
numLayers- the number of layers- Returns:
- this
Builder
-
setOutSize
Sets the size of the output.- Parameters:
outSize- the output size- Returns:
- this
Builder
-
optBatchNormMomentum
Sets the momentum of batchNorm layer.- Parameters:
batchNormMomentum- the momentum- Returns:
- this
Builder
-
setImageShape
Sets the shape of the image.- Parameters:
imageShape- the shape of the image- Returns:
- this
Builder
-
build
public ai.djl.nn.SequentialBlock build()Builds aResNetV1block.- Returns:
- the
ResNetV1block
-