TensorUInt16Bit.CreateFromIterable 方法

定义

创建 16 位无符号整数张量对象,分配大小形状的缓冲区,并将所有数据复制到其中。

public:
 static TensorUInt16Bit ^ CreateFromIterable(IIterable<long long> ^ shape, IIterable<unsigned short> ^ data);
 static TensorUInt16Bit CreateFromIterable(IIterable<long> const& shape, IIterable<uint16_t> const& data);
public static TensorUInt16Bit CreateFromIterable(IEnumerable<long> shape, IEnumerable<ushort> data);
function createFromIterable(shape, data)
Public Shared Function CreateFromIterable (shape As IEnumerable(Of Long), data As IEnumerable(Of UShort)) As TensorUInt16Bit

参数

shape

IIterable<Int64>

IEnumerable<Int64>

Windows.Foundation.Collections.IIterable

IIterable<long>

缓冲区的大小。

data

IIterable<UInt16>

IEnumerable<UInt16>

Windows.Foundation.Collections.IIterable

IIterable<uint16_t>

要复制到缓冲区中的数据。

返回

具有包含给定数据的缓冲区的 16 位无符号整数张量对象。

注解

Windows Server

若要在 Windows Server 上使用此 API,必须使用具有桌面体验的 Windows Server 2019。

线程安全

此 API 是线程安全的。

适用于