Class VGG.Builder
- java.lang.Object
-
- ai.djl.basicmodelzoo.cv.classification.VGG.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 aVGG
block.VGG.Builder
setConvArch(int[][] convArch)
Sets the number of blocks according to the user.VGG.Builder
setNumLayers(int numLayers)
Sets the number of layers.VGG.Builder
setOutSize(long outSize)
Sets the size of the output.
-
-
-
Method Detail
-
setNumLayers
public VGG.Builder setNumLayers(int numLayers)
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
public VGG.Builder setConvArch(int[][] convArch)
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
public VGG.Builder setOutSize(long outSize)
Sets the size of the output.- Parameters:
outSize
- the output size- Returns:
- this
Builder
-
-