Tensor.Random Normal Method
Definition
Namespace: Numerics.NET.Tensors
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 10.3.0
Assembly: Numerics.NET.Tensors (in Numerics.NET.Tensors.dll) Version: 10.3.0
Overload List
| Random | Constructs a new tensor with normal random numbers with zero mean and unit standard deviation. |
| Random | Constructs a new tensor with normal random numbers with zero mean and unit standard deviation. |
| Random | Constructs a new tensor with normal random numbers with zero mean and unit standard deviation. |
| Random | Constructs a new tensor with normal random numbers with zero mean and unit standard deviation. |
RandomNormal(TensorShape, ArrayMutability)
Constructs a new tensor with normal random numbers with zero mean and unit
standard deviation.
public static Tensor<double> RandomNormal(
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 Tensor<T>.
Exceptions
| Argument | shape is not a valid tensor shape. |
RandomNormal(TensorShape, IRandomSource, ArrayMutability)
Constructs a new tensor with normal random numbers with zero mean and unit
standard deviation.
public static Tensor<double> RandomNormal(
TensorShape shape,
IRandomSource random,
ArrayMutability mutability = ArrayMutability.MutableValues
)Parameters
- shape TensorShape
- The shape of the tensor.
- random IRandomSource
- 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 Tensor<T>.
Exceptions
| Argument | shape is not a valid tensor shape. |
RandomNormal(TensorShape, Random, ArrayMutability)
Constructs a new tensor with normal random numbers with zero mean and unit
standard deviation.
public static Tensor<double> RandomNormal(
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 Tensor<T>.
Exceptions
| Argument | shape is not a valid tensor shape. |
RandomNormal<TGenerator>(TensorShape, IRandomSource<TGenerator>, ArrayMutability)
Constructs a new tensor with normal random numbers with zero mean and unit
standard deviation.
public static Tensor<double> RandomNormal<TGenerator>(
TensorShape shape,
IRandomSource<TGenerator> random,
ArrayMutability mutability = ArrayMutability.MutableValues
)
where TGenerator : struct, new(), IRandomGenerator
Parameters
- shape TensorShape
- The shape of the tensor.
- random IRandomSource<TGenerator>
- The random number generator to use.
- mutability ArrayMutability (Optional)
- Optional. Specifies how the tensor's values may be changed. The default is mutable values.
Type Parameters
- TGenerator
- The underlying generator type of the random source, used to enable optimizations like inlining.
Return Value
Tensor<Double>A Tensor<T>.
Exceptions
| Argument | shape is not a valid tensor shape. |