TensorInt32Bit.CreateFromShapeArrayAndDataArray(Int64[], Int32[]) 方法

定义

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

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

参数

shape

Int64[]

long long[]

long[]

缓冲区的大小。

data

Int32[]

int[]

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

返回

一个 32 位带符号整数张量对象,其中包含包含给定数据的缓冲区。

Windows 要求

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

适用于