Modifier and Type | Method and Description |
---|---|
LayerNorm.Builder |
axis(int... axis)
List the axis over which the mean and variance will be calculated (alternative to
normalizedShape).
|
LayerNorm |
build()
Builds a
LayerNorm block. |
LayerNorm.Builder |
optCenter(boolean val)
If True, add offset of `beta` to normalized tensor.
|
LayerNorm.Builder |
optEpsilon(float val)
Sets the epsilon value to prevent division by 0.
|
LayerNorm.Builder |
optScale(boolean val)
If True, multiply result by `gamma`.
|
public LayerNorm.Builder axis(int... axis)
axis
- input axis over which the mean and variance will be calculated (if null all
existing dimensions)public LayerNorm.Builder optCenter(boolean val)
val
- True or False on whether to add and train offset valuepublic LayerNorm.Builder optScale(boolean val)
val
- True or False on whether to add and train scale valuepublic LayerNorm.Builder optEpsilon(float val)
val
- the epsilon value