共用方式為


Tensor.Split<T>(ReadOnlyTensorSpan<T>, Int32, IntPtr) 方法

定義

Tensor<T> 分割成沿著指定 dimensionsplitCount。 如果指定的 dimension 擲回例外狀況時,無法平均分割張量。

public:
generic <typename T>
 static cli::array <System::Numerics::Tensors::Tensor<T> ^> ^ Split(System::Numerics::Tensors::ReadOnlyTensorSpan<T> % tensor, int splitCount, IntPtr dimension);
public static System.Numerics.Tensors.Tensor<T>[] Split<T>(scoped in System.Numerics.Tensors.ReadOnlyTensorSpan<T> tensor, int splitCount, IntPtr dimension);
static member Split : ReadOnlyTensorSpan * int * nativeint -> System.Numerics.Tensors.Tensor<'T>[]
Public Function Split(Of T) (ByRef tensor As ReadOnlyTensorSpan(Of T), splitCount As Integer, dimension As IntPtr) As Tensor(Of T)()

類型參數

T

參數

tensor
ReadOnlyTensorSpan<T>

輸入 Tensor<T>

splitCount
Int32

分割 tensor 的次數

dimension
IntPtr

nativeint

要分割的座標軸。

傳回

Tensor<T>[]

適用於