Class MobileNetV2.Builder
java.lang.Object
ai.djl.basicmodelzoo.cv.classification.MobileNetV2.Builder
- Enclosing class:
- MobileNetV2
The Builder to construct a
MobileNetV2
object.-
Method Summary
Modifier and TypeMethodDescriptionai.djl.nn.Block
build()
Builds aMobileNetV2
block.optBatchNormMomentum
(float batchNormMomentum) Sets the momentum of batchNorm layer.optFilters
(int[] filters) Sets the filters(the value c defined in the paper) of customized MobileNetV2.optMultiTimes
(int[] multiTimes) Sets the multiTimes(the value t defined in the paper) of each bottleNeck of MobileNetV2.optRepeatTimes
(int[] repeatTimes) Sets the repeatTimes(the value n defined in the paper) of each block of MobileNetV2.optStrides
(int[] strides) Sets the strides(the value s defined in the paper) of each block of MobileNetV2.setOutSize
(long outSize) Sets the size of the output.
-
Method Details
-
optBatchNormMomentum
Sets the momentum of batchNorm layer.- Parameters:
batchNormMomentum
- the momentum- Returns:
- this
Builder
-
setOutSize
Sets the size of the output.- Parameters:
outSize
- the output size- Returns:
- this
Builder
-
optFilters
Sets the filters(the value c defined in the paper) of customized MobileNetV2.- Parameters:
filters
- the customized filter- Returns:
- this
Builder
-
optRepeatTimes
Sets the repeatTimes(the value n defined in the paper) of each block of MobileNetV2.- Parameters:
repeatTimes
- the customized repeatTimes- Returns:
- this
Builder
-
optStrides
Sets the strides(the value s defined in the paper) of each block of MobileNetV2.- Parameters:
strides
- the customized strides- Returns:
- this
Builder
-
optMultiTimes
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 aMobileNetV2
block.- Returns:
- the
MobileNetV2
block
-