Share via


TensorUInt16Bit.CreateFromArray(IIterable<Int64>, UInt16[]) 方法

定義

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

public:
 static TensorUInt16Bit ^ CreateFromArray(IIterable<long long> ^ shape, Platform::Array <unsigned short> ^ data);
 static TensorUInt16Bit CreateFromArray(IIterable<long> const& shape, winrt::array_view <uint16_t> const& data);
public static TensorUInt16Bit CreateFromArray(IEnumerable<long> shape, ushort[] data);
function createFromArray(shape, data)
Public Shared Function CreateFromArray (shape As IEnumerable(Of Long), data As UShort()) As TensorUInt16Bit

參數

shape

IIterable<Int64>

IEnumerable<Int64>

Windows.Foundation.Collections.IIterable

IIterable<long>

緩衝區的大小。

data

UInt16[]

unsigned short[]

uint16_t[]

要複製到緩衝區的資料。

傳回

具有包含指定資料的緩衝區的 16 位不帶正負號的整數 tensor 物件。

備註

Windows Server

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

執行緒安全

此 API 是安全線程。

適用於