TensorBoolean.CreateFromShapeArrayAndDataArray(Int64[], Boolean[]) 方法

定义

创建布尔张量对象、分配大小形状的缓冲区,并将所有数据复制到其中。

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

参数

shape

Int64[]

long long[]

long[]

缓冲区的大小。

data

Boolean[]

bool[]

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

返回

具有包含给定数据的缓冲区的布尔张量对象。

Windows 要求

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

适用于