Class VGG.Builder
java.lang.Object
ai.djl.basicmodelzoo.cv.classification.VGG.Builder
- Enclosing class:
- VGG
The Builder to construct a
VGG
object.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionai.djl.nn.Block
build()
Builds aVGG
block.setConvArch
(int[][] convArch) Sets the number of blocks according to the user.setNumLayers
(int numLayers) Sets the number of layers.setOutSize
(long outSize) Sets the size of the output.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setNumLayers
Sets the number of layers. It is equal to total sum of numConvs in convArch + 3.- Parameters:
numLayers
- the number of layers in the network. default is 11.- Returns:
- this
Builder
-
setConvArch
Sets the number of blocks according to the user. It can be of multiple types, VGG-11, VGG-13, VGG-16, VGG-19.- Parameters:
convArch
- 2-D array consisting of number of convolutions and the number of channels.- Returns:
- this
Builder
-
setOutSize
Sets the size of the output.- Parameters:
outSize
- the output size- Returns:
- this
Builder
-
build
public ai.djl.nn.Block build()Builds aVGG
block.- Returns:
- the
VGG
block
-