TensorInt8Bit.CreateFromShapeArrayAndDataArray(Int64[], Byte[]) 方法

定义

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

public:
 static TensorInt8Bit ^ CreateFromShapeArrayAndDataArray(Platform::Array <long long> ^ shape, Platform::Array <byte> ^ data);
 static TensorInt8Bit CreateFromShapeArrayAndDataArray(winrt::array_view <long> const& shape, winrt::array_view <byte> const& data);
public static TensorInt8Bit CreateFromShapeArrayAndDataArray(long[] shape, byte[] data);
function createFromShapeArrayAndDataArray(shape, data)
Public Shared Function CreateFromShapeArrayAndDataArray (shape As Long(), data As Byte()) As TensorInt8Bit

参数

shape

Int64[]

long long[]

long[]

缓冲区的大小。

data

Byte[]

byte[]

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

返回

包含包含给定数据的缓冲区的 8 位带符号整数张量对象。

Windows 要求

设备系列
Windows 10, version 1903 (在 10.0.18362.0 中引入)
API contract
Windows.AI.MachineLearning.MachineLearningContract (在 v2.0 中引入)

适用于