TensorInt8Bit 類別

定義

8 位帶正負號的整數張量物件。

public ref class TensorInt8Bit sealed : ITensor
public ref class TensorInt8Bit sealed : ITensor, IClosable, IMemoryBuffer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorInt8Bit final : ITensor
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorInt8Bit final : ITensor, IClosable, IMemoryBuffer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorInt8Bit : ITensor
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorInt8Bit : System.IDisposable, ITensor, IMemoryBuffer
Public NotInheritable Class TensorInt8Bit
Implements ITensor
Public NotInheritable Class TensorInt8Bit
Implements IDisposable, IMemoryBuffer, ITensor
繼承
Object Platform::Object IInspectable TensorInt8Bit
屬性
實作

Windows 需求

裝置系列
Windows 10, version 1809 (已於 10.0.17763.0 引進)
API contract
Windows.AI.MachineLearning.MachineLearningContract (已於 v1.0 引進)

備註

張量是值的多維度陣列。 8 位帶正負號的整數張量是 8 位帶正負號整數值的張量。

張量的配置是資料列主要,且緊密封裝的連續資料代表每個維度。 張量的大小總計是每個維度大小的乘積。

Windows Server

若要在 Windows Server 上使用此 API,您必須搭配桌面體驗使用 Windows Server 2019。

執行緒安全

此 API 是安全線程。

版本歷程記錄

Windows 版本 SDK 版本 新增值
1903 18362 CreateFromBuffer
1903 18362 CreateFromShapeArrayAndDataArray

屬性

Kind

功能的種類。

Shape

傳回每個維度的計數和大小。

TensorKind

傳回張量的資料型別。

方法

Close()

如果沒有從這個物件建立的未處理 IMemoryBufferReference 物件, Close 將會處置物件並終結其相關聯的資源。 否則, Close 會將其本身與其相關聯的資源中斷連結,而且會在最後一個 IMemoryBufferReference 關閉時終結。

Create()

建立 8 位帶正負號的整數張量物件,而不配置緩衝區。

Create(IIterable<Int64>)

建立 8 位帶正負號的整數張量物件,並配置大小 圖形的緩衝區。

CreateFromArray(IIterable<Int64>, Byte[])

建立 8 位帶正負號的整數張量物件、配置大小 圖形的緩衝區,並將 所有資料 複製到其中。

CreateFromBuffer(Int64[], IBuffer)

使用指定的 圖形 建立 8 位帶正負號的整數張量物件,並使用 緩衝區 中的基礎緩衝區進行後續評估。

CreateFromIterable(IIterable<Int64>, IIterable<Byte>)

建立 8 位帶正負號的整數張量物件、配置大小 圖形的緩衝區,並將 所有資料 複製到其中。

CreateFromShapeArrayAndDataArray(Int64[], Byte[])

建立 8 位帶正負號的整數張量物件、配置大小 圖形的緩衝區,並將 所有資料 複製到其中。

CreateReference()

傳回緩衝區的 IMemoryBufferReference 標記法,該緩衝區會備份 8 位帶正負號的整數張量物件。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

GetAsVectorView()

傳回資料的唯讀檢視。

適用於

另請參閱