Class MobileNetV2.Builder
- java.lang.Object
-
- ai.djl.basicmodelzoo.cv.classification.MobileNetV2.Builder
-
- Enclosing class:
- MobileNetV2
public static final class MobileNetV2.Builder extends java.lang.ObjectThe Builder to construct aMobileNetV2object.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ai.djl.nn.Blockbuild()Builds aMobileNetV2block.MobileNetV2.BuilderoptBatchNormMomentum(float batchNormMomentum)Sets the momentum of batchNorm layer.MobileNetV2.BuilderoptFilters(int[] filters)Sets the filters(the value c defined in the paper) of customized MobileNetV2.MobileNetV2.BuilderoptMultiTimes(int[] multiTimes)Sets the multiTimes(the value t defined in the paper) of each bottleNeck of MobileNetV2.MobileNetV2.BuilderoptRepeatTimes(int[] repeatTimes)Sets the repeatTimes(the value n defined in the paper) of each block of MobileNetV2.MobileNetV2.BuilderoptStrides(int[] strides)Sets the strides(the value s defined in the paper) of each block of MobileNetV2.MobileNetV2.BuildersetOutSize(long outSize)Sets the size of the output.
-
-
-
Method Detail
-
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 aMobileNetV2block.- Returns:
- the
MobileNetV2block
-
-