Tensor.Create Random Normal Method
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 9.0.3
Creates a tensor with random values from a normal distribution.
Overload List
Create | Constructs a new tensor with normal random numbers with zero mean and unit standard deviation. |
Create | 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.
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
Argument | 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.
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
Argument | shape is not a valid tensor shape. |