Lingua

TensorString Classe

Definizione

Oggetto tensore stringa.

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
Ereditarietà
Object Platform::Object IInspectable TensorString
Attributi
Implementazioni

Requisiti Windows

Requisiti Descrizione
Famiglia di dispositivi
Windows 10, version 1809 (è stato introdotto in 10.0.17763.0)
API contract
Windows.AI.MachineLearning.MachineLearningContract (è stato introdotto in v1.0)

Commenti

Un tensore è una matrice multidimensionale di valori. Un tensore stringa è un tensore di valori stringa.

Il layout dei tensori è principale della riga, con dati contigui strettamente compressi che rappresentano ogni dimensione. La dimensione totale di un tensore è il prodotto delle dimensioni di ogni dimensione.

Windows Server

Per usare questa API in Windows Server, è necessario usare Windows Server 2019 con Esperienza desktop.

Thread safety

Questa API è thread-safe.

Cronologia delle versioni

Versione di Windows Versione dell'SDK Valore aggiunto
1903 18362 CreateFromShapeArrayAndDataArray

Proprietà

Nome Descrizione
Kind

Restituisce il tipo di funzionalità.

Shape

Restituisce il numero e le dimensioni di ogni dimensione.

TensorKind

Restituisce il tipo di dati del tensore.

Metodi

Nome Descrizione
Close()

Se non sono presenti oggetti IMemoryBufferReference in sospeso creati da questo oggetto, Close eliminerà l'oggetto e eliminerà le risorse associate. In caso contrario, Close si scollega dalle risorse associate e verrà distrutto quando l'ultima IMemoryBufferReference viene chiusa.

Create()

Crea un oggetto tensore stringa senza allocare un buffer.

Create(IIterable<Int64>)

Crea un oggetto tensore stringa e alloca un buffer di forma di dimensione.

CreateFromArray(IIterable<Int64>, String[])

Crea un oggetto tensore stringa, alloca un buffer di forma di dimensione e copia tutti i dati in esso.

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

Crea un oggetto tensore stringa, alloca un buffer di forma di dimensione e copia tutti i dati in esso.

CreateFromShapeArrayAndDataArray(Int64[], String[])

Crea un oggetto tensore stringa, alloca un buffer di forma di dimensione e copia tutti i dati in esso.

CreateReference()

Questo metodo non è consentito per gli oggetti TensorString e non deve essere usato.

Dispose()

Esegue attività definite dall'applicazione, come rilasciare o reimpostare risorse non gestite.

GetAsVectorView()

Restituisce una visualizzazione di sola lettura dei dati.

Si applica a

Vedi anche