TensorFloat.CreateFromBuffer(Int64[], IBuffer) メソッド

定義

指定した 図形 を持つ float テンソル オブジェクトを作成し、その後の評価のために基になるバッファーを データ で使用します。

public:
 static TensorFloat ^ CreateFromBuffer(Platform::Array <long long> ^ shape, IBuffer ^ buffer);
 static TensorFloat CreateFromBuffer(winrt::array_view <long> const& shape, IBuffer const& buffer);
public static TensorFloat CreateFromBuffer(long[] shape, IBuffer buffer);
function createFromBuffer(shape, buffer)
Public Shared Function CreateFromBuffer (shape As Long(), buffer As IBuffer) As TensorFloat

パラメーター

shape

Int64[]

long long[]

long[]

バッファーのサイズ。

buffer
IBuffer

評価時に使用するバッファー。

戻り値

指定された IBufferデータへのバッファー参照によってサポートされる float テンソル オブジェクト。

Windows の要件

デバイス ファミリ
Windows 10, version 1903 (10.0.18362.0 で導入)
API contract
Windows.AI.MachineLearning.MachineLearningContract (v2.0 で導入)

注釈

このオブジェクトの作成時にコピーは実行されません。 データ 内の基になるバッファーはエンジンによって直接使用されます。

ビデオ メモリへのコピーは、CPU 以外のデバイスで実行するときに行われます。

適用対象