RandomNormal

public class RandomNormal

Initializer that generates tensors with a normal distribution.

Examples:

     long seed = 1001l;
     RandomNormal<TFloat32, TFloat32> initializer =
              new org.tensorflow.framework.initializers.RandomNormal<>(tf, seed);
     Operand<TFloat32> values =
              initializer.call(tf.constant(Shape.of(2,2)), TFloat32.class);
 

Constants

double MEAN_DEFAULT
double STDDEV_DEFAULT

Public Constructors

RandomNormal (Ops tf, long seed)
Creates the RandomUniform initializer using MEAN_DEFAULT for the mean and STDDEV_DEFAULT for the standard deviation.
RandomNormal (Ops tf, double mean, long seed)
Creates the RandomUniform initializer using STDDEV_DEFAULT for the standard deviation.
RandomNormal (Ops tf, double mean, double stddev, long seed)
creates the RandomUniform initializer

Public Methods

Operand <T>
call ( Operand < TInt64 > dims, Class<T> type)

Inherited Methods

Constants

public static final double MEAN_DEFAULT

Constant Value: 0.0

public static final double STDDEV_DEFAULT

Constant Value: 1.0

Public Constructors

public RandomNormal (Ops tf, long seed)

Creates the RandomUniform initializer using MEAN_DEFAULT for the mean and STDDEV_DEFAULT for the standard deviation.

Parameters
tf the TensorFlow Ops
seed the seed for random number generation. An initializer created with a given seed will always produce the same random tensor for a given shape and dtype.

public RandomNormal (Ops tf, double mean, long seed)

Creates the RandomUniform initializer using STDDEV_DEFAULT for the standard deviation.

Parameters
tf the TensorFlow Ops
mean Mean of the random values to generate.
seed the seed for random number generation. An initializer created with a given seed will always produce the same random tensor for a given shape and dtype.

public RandomNormal (Ops tf, double mean, double stddev, long seed)

creates the RandomUniform initializer

Parameters
tf the TensorFlow Ops
mean Mean of the random values to generate.
stddev Standard deviation of the random values to generate.
seed the seed for random number generation. An initializer created with a given seed will always produce the same random tensor for a given shape and dtype.

Public Methods

public Operand <T> call ( Operand < TInt64 > dims, Class<T> type)