共用方式為


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)

來源:
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)

來源:
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 是否應釘選基礎數據。

傳回

實作

適用於