Package ai.djl.nn.norm
Class BatchNorm.Builder
- java.lang.Object
-
- ai.djl.nn.norm.BatchNorm.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchNormbuild()Builds aBatchNormblock.BatchNorm.BuilderoptAxis(int axis)Set the axis in which channel is specified.BatchNorm.BuilderoptCenter(boolean val)If True, add offset of `beta` to normalized tensor.BatchNorm.BuilderoptEpsilon(float val)Sets the epsilon value to prevent division by 0.BatchNorm.BuilderoptMomentum(float val)Set the momentum for moving average.BatchNorm.BuilderoptScale(boolean val)If True, multiply result by `gamma`.
-
-
-
Method Detail
-
optAxis
public BatchNorm.Builder optAxis(int axis)
Set the axis in which channel is specified. Defaults to 1.- Parameters:
axis- the axis in which channel is specified- Returns:
- this Builder
-
optCenter
public BatchNorm.Builder optCenter(boolean val)
If True, add offset of `beta` to normalized tensor. Defaults to True.- Parameters:
val- True or False on whether to add and train offset value- Returns:
- this Builder
-
optScale
public BatchNorm.Builder optScale(boolean val)
If True, multiply result by `gamma`. Defaults to True;- Parameters:
val- True or False on whether to add and train scale value- Returns:
- this Builder
-
optEpsilon
public BatchNorm.Builder optEpsilon(float val)
Sets the epsilon value to prevent division by 0.- Parameters:
val- the epsilon value- Returns:
- this Builder
-
optMomentum
public BatchNorm.Builder optMomentum(float val)
Set the momentum for moving average.- Parameters:
val- the momentum for moving average- Returns:
- this Builder
-
-