Tensor.CreateRandomNormal Method

Definition

Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.0
Creates a tensor with random values from a normal distribution.

Overload List

CreateRandomNormal(TensorShape, ArrayMutability) Constructs a new tensor with normal random numbers with zero mean and unit standard deviation.
CreateRandomNormal(TensorShape, Random, ArrayMutability) Constructs a new tensor with normal random numbers with zero mean and unit standard deviation.

CreateRandomNormal(TensorShape, ArrayMutability)

Constructs a new tensor with normal random numbers with zero mean and unit standard deviation.
C#
public static Tensor<double> CreateRandomNormal(
	TensorShape shape,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

shape  TensorShape
The shape of the tensor.
mutability  ArrayMutability  (Optional)
Optional. Specifies how the tensor's values may be changed. The default is mutable values.

Return Value

Tensor<Double>
A DenseTensor.

Exceptions

ArgumentException

shape is not a valid tensor shape.

CreateRandomNormal(TensorShape, Random, ArrayMutability)

Constructs a new tensor with normal random numbers with zero mean and unit standard deviation.
C#
public static Tensor<double> CreateRandomNormal(
	TensorShape shape,
	Random random,
	ArrayMutability mutability = ArrayMutability.MutableValues
)

Parameters

shape  TensorShape
The shape of the tensor.
random  Random
The random number generator to use.
mutability  ArrayMutability  (Optional)
Optional. Specifies how the tensor's values may be changed. The default is mutable values.

Return Value

Tensor<Double>
A DenseTensor.

Exceptions

ArgumentException

shape is not a valid tensor shape.

See Also