다음을 통해 공유


LearningModel.Description 속성

정의

모델에 대한 설명입니다.

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

속성 값

String

Platform::String

winrt::hstring

모델에 대한 설명입니다.

예제

다음 예제에서는 로컬 파일에서 모델을 로드하고, 모델 설명을 애플리케이션의 UI에 출력하고, 모델에서 세션을 만듭니다.

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

설명

Windows Server

Windows Server에서 이 API를 사용하려면 데스크톱 환경에서 Windows Server 2019를 사용해야 합니다.

스레드로부터의 안전성

이 API는 스레드로부터 안전합니다.

적용 대상