Class GlorotUniform
java.lang.Object
com.jml.neural_network.layers.initilizers.GlorotUniform
- All Implemented Interfaces:
Initializer
layer
parameter initializer to produce random values from a clipped uniform distribution in [-lim, lim] where
lim = sqrt(6 / (fanIn + fanOut)), fanIn is the input dimension for the layer, and fanOut is the output dimension for
the layer.-
Constructor Summary
ConstructorDescriptionCreates a GlorotNormal initializer with specified seed.GlorotUniform(long seed)
Creates a GlorotNormal initializer with specified 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
-
GlorotUniform
public GlorotUniform()Creates a GlorotNormal initializer with specified seed. -
GlorotUniform
public GlorotUniform(long seed)Creates a GlorotNormal initializer with specified seed.- Parameters:
seed
- Seed for the 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.
-