Tensor<T>.ITensor<Tensor<T>,T>.Create 方法

定义

重载

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, Boolean)

创建一个 Tensor<T>,并使用默认值 T 初始化它。如果 pinned 为 true,则会固定内存。

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

创建一个 Tensor<T>,并使用默认值 T 初始化它。如果 pinned 为 true,则会固定内存。

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.cs

创建一个 Tensor<T>,并使用默认值 T 初始化它。如果 pinned 为 true,则会固定内存。

 static System::Numerics::Tensors::Tensor<T> ^ System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create(ReadOnlySpan<IntPtr> lengths, bool pinned) = System::Numerics::Tensors::ITensor<System::Numerics::Tensors::Tensor<T> ^, T>::Create;
static System.Numerics.Tensors.Tensor<T> ITensor<Tensor<T>,T>.Create (ReadOnlySpan<IntPtr> lengths, bool pinned);
static member System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create : ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
 Shared Function Create (lengths As ReadOnlySpan(Of IntPtr), pinned As Boolean) As Tensor(Of T) Implements ITensor(Of Tensor(Of T), T).Create

参数

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

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

pinned
Boolean

Boolean 是否应固定基础数据。

返回

实现

适用于

ITensor<Tensor<T>,T>.Create(ReadOnlySpan<IntPtr>, ReadOnlySpan<IntPtr>, Boolean)

Source:
Tensor.cs

创建一个 Tensor<T>,并使用默认值 T 初始化它。如果 pinned 为 true,则会固定内存。

 static System::Numerics::Tensors::Tensor<T> ^ System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create(ReadOnlySpan<IntPtr> lengths, ReadOnlySpan<IntPtr> strides, bool pinned) = System::Numerics::Tensors::ITensor<System::Numerics::Tensors::Tensor<T> ^, T>::Create;
static System.Numerics.Tensors.Tensor<T> ITensor<Tensor<T>,T>.Create (ReadOnlySpan<IntPtr> lengths, ReadOnlySpan<IntPtr> strides, bool pinned);
static member System.Numerics.Tensors.ITensor<System.Numerics.Tensors.Tensor<T>,T>.Create : ReadOnlySpan<nativeint> * ReadOnlySpan<nativeint> * bool -> System.Numerics.Tensors.Tensor<'T>
 Shared Function Create (lengths As ReadOnlySpan(Of IntPtr), strides As ReadOnlySpan(Of IntPtr), pinned As Boolean) As Tensor(Of T) Implements ITensor(Of Tensor(Of T), T).Create

参数

lengths

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

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

strides

ReadOnlySpan<IntPtr>

ReadOnlySpan<nativeint>

指示每个维度的步幅的 ReadOnlySpan<T>

pinned
Boolean

Boolean 是否应固定基础数据。

返回

实现

适用于