Class RandomNormal
java.lang.Object
com.jml.neural_network.layers.initilizers.RandomNormal
- All Implemented Interfaces:
Initializer
layer
parameter initializer to produce random values from a normal distribution.-
Constructor Summary
ConstructorDescriptionCreates a RandomNormal initializer with mean 0 and standard deviation 1.RandomNormal(double std)
Creates a RandomNormal initializer with mean 0 and specified standard deviation.RandomNormal(double std, double mean)
Creates a RandomNormal initializer with specified mean and standard deviation.RandomNormal(double std, double mean, long seed)
Creates a RandomNormal initializer with specified mean and standard deviation. -
Method Summary
Modifier and TypeMethodDescriptionlinalg.Matrix
init(int m, int n)
Creates and initializes a matrix with entries from a Random Normal Distribution.
-
Constructor Details
-
RandomNormal
public RandomNormal()Creates a RandomNormal initializer with mean 0 and standard deviation 1. -
RandomNormal
public RandomNormal(double std)Creates a RandomNormal initializer with mean 0 and specified standard deviation.- Parameters:
std
- Standard deviation for random normal distribution.
-
RandomNormal
public RandomNormal(double std, double mean)Creates a RandomNormal initializer with specified mean and standard deviation.- Parameters:
std
- Standard deviation for random normal distribution.mean
- Mean for random normal distribution.
-
RandomNormal
public RandomNormal(double std, double mean, long seed)Creates a RandomNormal initializer with specified mean and standard deviation.- Parameters:
std
- Standard deviation for random normal distribution.mean
- Mean for random normal distribution.seed
- Seed for the random number generator.
-
-
Method Details
-
init
public linalg.Matrix init(int m, int n)Creates and initializes a matrix with entries from a Random Normal Distribution.- Specified by:
init
in interfaceInitializer
- Parameters:
m
- Number of rows in the matrix to initialize.n
- Number of columns in the matrix.- Returns:
-