Condividi tramite


LearningModel.Description Proprietà

Definizione

Descrizione del modello.

public:
 property Platform::String ^ Description { Platform::String ^ get(); };
winrt::hstring Description();
public string Description { get; }
var string = learningModel.description;
Public ReadOnly Property Description As String

Valore della proprietà

String

Platform::String

winrt::hstring

Descrizione del modello.

Esempio

L'esempio seguente carica un modello da un file locale, restituisce la descrizione del modello nell'interfaccia utente dell'applicazione e crea una sessione dal modello.

private async Task LoadModelAsync(string _modelFileName)
{
    LearningModel _model;
    LearningModelSession _session;

    try
    {
        // Load and create the model
        var modelFile = 
            await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/{_modelFileName}"));
        _model = await LearningModel.LoadFromStorageFileAsync(modelFile);

        //Output the model description to application UI
        StatusBlock.Text = $"Model Description: {_model.Description}";

        // Create the evaluation session with the model
        _session = new LearningModelSession(_model);

    }
    catch (Exception ex)
    {
        StatusBlock.Text = $"error: {ex.Message}";
        _model = null;
    }
}

Commenti

Windows Server

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

Thread safety

Questa API è thread-safe.

Si applica a