Partage via


LearningModel.Description Propriété

Définition

Description du modèle.

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

Valeur de propriété

String

Platform::String

winrt::hstring

Description du modèle.

Exemples

L’exemple suivant charge un modèle à partir d’un fichier local, génère la description du modèle dans l’interface utilisateur de l’application et crée une session à partir du modèle.

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;
    }
}

Remarques

Windows Server

Pour utiliser cette API sur Windows Server, vous devez utiliser Windows Server 2019 avec Expérience de bureau.

Sécurité des threads

Cette API est thread-safe.

S’applique à