Tensor.CreateAndFillUniformDistribution 方法

定义

重载

CreateAndFillUniformDistribution<T>(Random, ReadOnlySpan<IntPtr>)

创建一个 Tensor<T>,并使用随机数据统一分布初始化它。

CreateAndFillUniformDistribution<T>(ReadOnlySpan<IntPtr>)

创建一个 Tensor<T>,并使用随机数据统一分布初始化它。

CreateAndFillUniformDistribution<T>(Random, ReadOnlySpan<IntPtr>)

Source:
Tensor.Factory.cs

创建一个 Tensor<T>,并使用随机数据统一分布初始化它。

public:
generic <typename T>
 where T : System::Numerics::IFloatingPoint<T> static System::Numerics::Tensors::Tensor<T> ^ CreateAndFillUniformDistribution(Random ^ random, ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.Tensor<T> CreateAndFillUniformDistribution<T> (Random random, scoped ReadOnlySpan<IntPtr> lengths) where T : System.Numerics.IFloatingPoint<T>;
static member CreateAndFillUniformDistribution : Random * ReadOnlySpan<nativeint> -> System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IFloatingPoint<'T>)> (requires 'T :> System.Numerics.IFloatingPoint<'T>)
Public Function CreateAndFillUniformDistribution(Of T As IFloatingPoint(Of T)) (random As Random, lengths As ReadOnlySpan(Of IntPtr)) As Tensor(Of T)

类型参数

T

参数

random
Random
lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

指示每个维度的长度的 ReadOnlySpan<T>

返回

适用于

CreateAndFillUniformDistribution<T>(ReadOnlySpan<IntPtr>)

Source:
Tensor.Factory.cs

创建一个 Tensor<T>,并使用随机数据统一分布初始化它。

public:
generic <typename T>
 where T : System::Numerics::IFloatingPoint<T> static System::Numerics::Tensors::Tensor<T> ^ CreateAndFillUniformDistribution(ReadOnlySpan<IntPtr> lengths);
public static System.Numerics.Tensors.Tensor<T> CreateAndFillUniformDistribution<T> (scoped ReadOnlySpan<IntPtr> lengths) where T : System.Numerics.IFloatingPoint<T>;
static member CreateAndFillUniformDistribution : ReadOnlySpan<nativeint> -> System.Numerics.Tensors.Tensor<'T (requires 'T :> System.Numerics.IFloatingPoint<'T>)> (requires 'T :> System.Numerics.IFloatingPoint<'T>)
Public Function CreateAndFillUniformDistribution(Of T As IFloatingPoint(Of T)) (lengths As ReadOnlySpan(Of IntPtr)) As Tensor(Of T)

类型参数

T

参数

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

指示每个维度的长度的 ReadOnlySpan<T>

返回

适用于