Class MobileNetV2.Builder

java.lang.Object
ai.djl.basicmodelzoo.cv.classification.MobileNetV2.Builder
Enclosing class:
MobileNetV2

public static final class MobileNetV2.Builder extends Object
The Builder to construct a MobileNetV2 object.
  • Method Details

    • optBatchNormMomentum

      public MobileNetV2.Builder optBatchNormMomentum(float batchNormMomentum)
      Sets the momentum of batchNorm layer.
      Parameters:
      batchNormMomentum - the momentum
      Returns:
      this Builder
    • setOutSize

      public MobileNetV2.Builder setOutSize(long outSize)
      Sets the size of the output.
      Parameters:
      outSize - the output size
      Returns:
      this Builder
    • optFilters

      public MobileNetV2.Builder optFilters(int[] filters)
      Sets the filters(the value c defined in the paper) of customized MobileNetV2.
      Parameters:
      filters - the customized filter
      Returns:
      this Builder
    • optRepeatTimes

      public MobileNetV2.Builder optRepeatTimes(int[] repeatTimes)
      Sets the repeatTimes(the value n defined in the paper) of each block of MobileNetV2.
      Parameters:
      repeatTimes - the customized repeatTimes
      Returns:
      this Builder
    • optStrides

      public MobileNetV2.Builder optStrides(int[] strides)
      Sets the strides(the value s defined in the paper) of each block of MobileNetV2.
      Parameters:
      strides - the customized strides
      Returns:
      this Builder
    • optMultiTimes

      public MobileNetV2.Builder optMultiTimes(int[] multiTimes)
      Sets the multiTimes(the value t defined in the paper) of each bottleNeck of MobileNetV2.
      Parameters:
      multiTimes - the customized multiTimes
      Returns:
      this Builder
    • build

      public ai.djl.nn.Block build()
      Builds a MobileNetV2 block.
      Returns:
      the MobileNetV2 block