Class MobileNetV1

java.lang.Object
ai.djl.basicmodelzoo.cv.classification.MobileNetV1

public final class MobileNetV1 extends Object
MobileNetV1 contains 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

  • Method Details

    • depthSeparableConv2d

      public static ai.djl.nn.Block depthSeparableConv2d(int inputChannels, int outputChannels, int stride, MobileNetV1.Builder builder)
      Builds a Block that represent a depthWise-pointWise Unit used in the implementation of the MobileNet Model.
      Parameters:
      inputChannels - number of inputChannels, used for depthWise Kernel
      outputChannels - number of outputChannels, used for pointWise kernel
      stride - control the stride of depthWise Kernel
      builder - add the builder to obtain batchNormMomentum
      Returns:
      a Block that represent a depthWise-pointWise Unit
    • mobilenet

      public static ai.djl.nn.Block mobilenet(MobileNetV1.Builder builder)
      Creates a new Block of MobileNetV1 with the arguments from the given MobileNetV1.Builder.
      Parameters:
      builder - the MobileNetV1.Builder with the necessary arguments
      Returns:
      a Block that represents the required MobileNet model
    • builder

      public static MobileNetV1.Builder builder()
      Creates a builder to build a MobileNetV1.
      Returns:
      a new builder