Class RandomUniform
java.lang.Object
com.jml.neural_network.layers.initilizers.RandomUniform
- All Implemented Interfaces:
Initializer
layer
parameter initializer to produce random values from a uniform distribution.-
Constructor Summary
ConstructorDescriptionCreates a RandomUniform Initializer within [0, 1].RandomUniform(double min, double max)
Creates a RandomUniform Initializer with specified range.RandomUniform(double min, double max, long seed)
Creates a RandomUniform Initializer with specified range and seed. -
Method Summary
Modifier and TypeMethodDescriptionlinalg.Matrix
init(int m, int n)
Initializes values of a weight/bias matrix as specified by this initializer.
-
Constructor Details
-
RandomUniform
public RandomUniform()Creates a RandomUniform Initializer within [0, 1]. -
RandomUniform
public RandomUniform(double min, double max)Creates a RandomUniform Initializer with specified range.- Parameters:
min
- Lower bound for random uniform distribution.max
- Upper bound for random uniform distribution.
-
RandomUniform
public RandomUniform(double min, double max, long seed)Creates a RandomUniform Initializer with specified range and seed.- Parameters:
min
- Lower bound for random uniform distribution.max
- Upper bound for random uniform distribution.seed
- Seed for random number generator.
-
-
Method Details
-
init
public linalg.Matrix init(int m, int n)Initializes values of a weight/bias matrix as specified by this initializer.- Specified by:
init
in interfaceInitializer
- Parameters:
m
- Number of rows in the matrix.n
- Number of columns in the matrix.- Returns:
- A
Matrix
initialized with values from the distribution specified by this initializer.
-