public class TruncatedNormalInitializer extends java.lang.Object implements Initializer
ONES, ZEROS
Constructor and Description |
---|
TruncatedNormalInitializer()
Creates an instance of
TruncatedNormalInitializer with a default sigma of 0.01. |
TruncatedNormalInitializer(float sigma)
Creates a TruncatedNormalInitializer initializer.
|
Modifier and Type | Method and Description |
---|---|
NDArray |
initialize(NDManager baseManager,
Shape shape,
DataType dataType)
Initializes a single
NDArray . |
public TruncatedNormalInitializer()
TruncatedNormalInitializer
with a default sigma of 0.01.public TruncatedNormalInitializer(float sigma)
sigma
- the standard deviation of the truncated normal distribution. Values outside
(-2σ, 2σ) will be rejected.public NDArray initialize(NDManager baseManager, Shape shape, DataType dataType)
Initializer
NDArray
.initialize
in interface Initializer
baseManager
- the NDManager
to create the new NDArray
inshape
- the Shape
for the new NDArraydataType
- the DataType
for the new NDArrayNDArray
initialized with the manager and shape