public class UniformInitializer extends java.lang.Object implements Initializer
UniformInitializer initializes weights with random values uniformly sampled from a given
range.ONES, ZEROS| Constructor and Description |
|---|
UniformInitializer()
Creates an instance of
UniformInitializer with a default scale of 0.07. |
UniformInitializer(float scale)
Initializes a uniform initializer.
|
| Modifier and Type | Method and Description |
|---|---|
NDArray |
initialize(NDManager manager,
Shape shape,
DataType dataType)
Initializes a single
NDArray. |
public UniformInitializer()
UniformInitializer with a default scale of 0.07.public UniformInitializer(float scale)
scale - the bound on the range of the generated random values. Values are generated from
the range [-`scale`, `scale`]. Default scale is 0.07.public NDArray initialize(NDManager manager, Shape shape, DataType dataType)
NDArray.initialize in interface Initializermanager - 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