Class MobileNetV1
- java.lang.Object
-
- ai.djl.basicmodelzoo.cv.classification.MobileNetV1
-
public final class MobileNetV1 extends java.lang.ObjectMobileNetV1contains a generic implementation of Mobilenet adapted from https://github.com/weiaicunzai/pytorch-cifar100/blob/master/models/mobilenet.py (Original author weiaicunzai).see https://arxiv.org/pdf/1704.04861.pdf for more information about MobileNet
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMobileNetV1.BuilderThe Builder to construct aMobileNetV1object.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MobileNetV1.Builderbuilder()Creates a builder to build aMobileNetV1.static ai.djl.nn.BlockdepthSeparableConv2d(int inputChannels, int outputChannels, int stride, MobileNetV1.Builder builder)Builds aBlockthat represent a depthWise-pointWise Unit used in the implementation of the MobileNet Model.static ai.djl.nn.Blockmobilenet(MobileNetV1.Builder builder)
-
-
-
Method Detail
-
depthSeparableConv2d
public static ai.djl.nn.Block depthSeparableConv2d(int inputChannels, int outputChannels, int stride, MobileNetV1.Builder builder)Builds aBlockthat represent a depthWise-pointWise Unit used in the implementation of the MobileNet Model.- Parameters:
inputChannels- number of inputChannels, used for depthWise KerneloutputChannels- number of outputChannels, used for pointWise kernelstride- control the stride of depthWise Kernelbuilder- add the builder to obtain batchNormMomentum- Returns:
- a
Blockthat represent a depthWise-pointWise Unit
-
mobilenet
public static ai.djl.nn.Block mobilenet(MobileNetV1.Builder builder)
- Parameters:
builder- theMobileNetV1.Builderwith the necessary arguments- Returns:
- a
Blockthat represents the required MobileNet model
-
builder
public static MobileNetV1.Builder builder()
Creates a builder to build aMobileNetV1.- Returns:
- a new builder
-
-