LearningModel.Author Propiedad

Definición

Nombre del autor del modelo.

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

Valor de propiedad

String

Platform::String

winrt::hstring

Nombre del autor del modelo.

Ejemplos

En el ejemplo siguiente se carga un modelo desde un archivo local, se genera el autor del modelo en la interfaz de usuario de la aplicación y se crea una sesión a partir del modelo.

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 author to application UI
        StatusBlock.Text = $"Model Author: {_model.Author}";

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

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

Comentarios

Windows Server

Para usar esta API en Windows Server, debe usar Windows Server 2019 con experiencia de escritorio.

Seguridad para subprocesos

Esta API es segura para subprocesos.

Se aplica a