Class VGG
- java.lang.Object
-
- ai.djl.basicmodelzoo.cv.classification.VGG
-
public final class VGG extends java.lang.Object
VGG model from the "Very Deep Convolutional Networks for Large-Scale Image Recognition" https://arxiv.org/abs/1409.1556 paper.- See Also:
- The D2L chapter on VGG
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VGG.Builder
The Builder to construct aVGG
object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VGG.Builder
builder()
Creates a builder to build aVGG
.static ai.djl.nn.Block
vgg(VGG.Builder builder)
Creates a VGG block with the help of the VGG Builder.ai.djl.nn.SequentialBlock
vggBlock(int numConvs, int numChannels)
Creates a constituent VGG block that becomes a part of the whole VGG model.
-
-
-
Method Detail
-
vgg
public static ai.djl.nn.Block vgg(VGG.Builder builder)
Creates a VGG block with the help of the VGG Builder.- Parameters:
builder
- theVGG.Builder
with the necessary arguments- Returns:
- a VGG block.
-
vggBlock
public ai.djl.nn.SequentialBlock vggBlock(int numConvs, int numChannels)
Creates a constituent VGG block that becomes a part of the whole VGG model.- Parameters:
numConvs
- Numbers of layers in each feature block.numChannels
- Numbers of filters in each feature block. List length should match the layers.- Returns:
- a constituent vgg block.
-
builder
public static VGG.Builder builder()
Creates a builder to build aVGG
.- Returns:
- a new builder
-
-