LearningModel.Description Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A description of the model.
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
Property Value
A description of the model.
Examples
The following example loads a model from a local file, outputs the model description to the application's UI, and creates a session from the model.
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;
}
}
Remarks
Windows Server
To use this API on Windows Server, you must use Windows Server 2019 with Desktop Experience.
Thread safety
This API is thread-safe.