LearningModelPreview.Description 属性

定义

已弃用。 获取已训练的机器学习模型的描述性元数据。

public:
 property LearningModelDescriptionPreview ^ Description { LearningModelDescriptionPreview ^ get(); };
LearningModelDescriptionPreview Description();
/// [get: Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
LearningModelDescriptionPreview Description();
public LearningModelDescriptionPreview Description { get; }
public LearningModelDescriptionPreview Description { [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; }
var learningModelDescriptionPreview = learningModelPreview.description;
Public ReadOnly Property Description As LearningModelDescriptionPreview

属性值

机器学习模型的描述性元数据。

属性

示例

public async Task LoadModel()
{
    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);

    // Confirm the version of the model is 1
    if (model.Description.Version != 1)
    {
		...
    }
}

注解

警告

这是一个已弃用的 API。 请改用 Windows.AI.MachineLearning 命名空间。

适用于