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

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

org.tensorflow.framework.initializers.BaseInitializer
Ops
getTF()
Gets the TensorFlow Ops
boolean
equals(Object arg0)
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
org.tensorflow.framework.initializers.Initializer
abstract Operand<T>
call(Operand<TInt64> dims, Class<T> type)
Generates the operation used to perform the initialization.

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)