Tensor.Create Random 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
| Create |
Constructs a new tensor with uniform random numbers between 0 and 1.
|
| Create |
Constructs a new tensor with uniform random numbers between 0 and 1.
|
CreateRandom(TensorShape, ArrayMutability)
Constructs a new tensor with uniform random numbers between 0 and 1.
[ObsoleteAttribute("Use the Random method instead.")]
public static Tensor<double> CreateRandom(
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. |
CreateRandom(TensorShape, Random, ArrayMutability)
Constructs a new tensor with uniform random numbers between 0 and 1.
[ObsoleteAttribute("Use the Random method instead.")]
public static Tensor<double> CreateRandom(
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. |