TensorString クラス

定義

文字列テンソル オブジェクト。

public ref class TensorString sealed : ITensor
public ref class TensorString sealed : ITensor, IClosable, IMemoryBuffer
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorString final : ITensor
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.MachineLearningContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TensorString final : ITensor, IClosable, IMemoryBuffer
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorString : ITensor
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.MachineLearningContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TensorString : System.IDisposable, ITensor, IMemoryBuffer
Public NotInheritable Class TensorString
Implements ITensor
Public NotInheritable Class TensorString
Implements IDisposable, IMemoryBuffer, ITensor
継承
Object Platform::Object IInspectable TensorString
属性
実装

Windows の要件

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

注釈

テンソルは、値の多次元配列です。 文字列テンソルは、文字列値のテンソルです。

テンソルのレイアウトは行メジャーであり、各ディメンションを表す連続したデータが密に詰め込まれています。 テンソルの合計サイズは、各ディメンションのサイズの積です。

Windows Server

Windows Server でこの API を使用するには、Windows Server 2019 デスクトップ エクスペリエンスを使用する必要があります。

スレッド セーフ

この API はスレッド セーフです。

バージョン履歴

Windows のバージョン SDK バージョン 追加された値
1903 18362 CreateFromShapeArrayAndDataArray

プロパティ

Kind

機能の種類を返します。

Shape

各ディメンションの数とサイズを返します。

TensorKind

テンソルのデータ型を返します。

メソッド

Close()

このオブジェクトから作成された未処理 の IMemoryBufferReference オブジェクトがない場合、 Close はオブジェクトを破棄し、関連付けられているリソースを破棄します。 それ以外の場合、 Close は関連付けられているリソースからそれ自体をデタッチし、最後の IMemoryBufferReference が閉じられたときに破棄されます。

Create()

バッファーを割り当てずに文字列テンソル オブジェクトを作成します。

Create(IIterable<Int64>)

文字列テンソル オブジェクトを作成し、サイズ 図形のバッファーを割り当てます。

CreateFromArray(IIterable<Int64>, String[])

文字列テンソル オブジェクトを作成し、サイズ 図形のバッファーを割り当て、すべての データ をコピーします。

CreateFromIterable(IIterable<Int64>, IIterable<String>)

文字列テンソル オブジェクトを作成し、サイズ 図形のバッファーを割り当て、すべての データ をコピーします。

CreateFromShapeArrayAndDataArray(Int64[], String[])

文字列テンソル オブジェクトを作成し、サイズ 図形のバッファーを割り当て、すべての データ をコピーします。

CreateReference()

このメソッドは TensorString オブジェクトでは許可されていないため、使用しないでください。

Dispose()

アンマネージ リソースの解放またはリセットに関連付けられているアプリケーション定義のタスクを実行します。

GetAsVectorView()

データの読み取り専用ビューを返します。

適用対象

こちらもご覧ください