Share via


TensorUInt8Bit.CreateFromBuffer(Int64[], IBuffer) 方法

定義

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

public:
 static TensorUInt8Bit ^ CreateFromBuffer(Platform::Array <long long> ^ shape, IBuffer ^ buffer);
 static TensorUInt8Bit CreateFromBuffer(winrt::array_view <long> const& shape, IBuffer const& buffer);
public static TensorUInt8Bit CreateFromBuffer(long[] shape, IBuffer buffer);
function createFromBuffer(shape, buffer)
Public Shared Function CreateFromBuffer (shape As Long(), buffer As IBuffer) As TensorUInt8Bit

參數

shape

Int64[]

long long[]

long[]

緩衝區的大小。

buffer
IBuffer

評估期間要使用的緩衝區。

傳回

由所提供 IBuffer緩衝區的緩衝區參考所支援的 8 位不帶正負號的整數張量物件。

Windows 需求

裝置系列
Windows 10, version 1903 (已於 10.0.18362.0 引進)
API contract
Windows.AI.MachineLearning.MachineLearningContract (已於 v2.0 引進)

備註

建立此物件期間不會執行任何複本,而且引擎會直接使用緩衝區中的基礎 緩衝區

在非 CPU 裝置上執行時,會複製至視訊記憶體。

適用於