LearningModelDescriptionPreview 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
已取代。 表示所提供模型的中繼資料和屬性描述。
public ref class LearningModelDescriptionPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class LearningModelDescriptionPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class LearningModelDescriptionPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class LearningModelDescriptionPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelDescriptionPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelDescriptionPreview
Public NotInheritable Class LearningModelDescriptionPreview
- 繼承
- 屬性
Windows 需求
裝置系列 |
Windows 10, version 1803 (已於 10.0.17134.0 引進)
|
API contract |
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (已於 v1.0 引進)
|
範例
public void Evaluator()
{
var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);
// Our evaluator only handles version 1 of the model
if (model.Description.Version != 1)
{
throw new Exception("Invalid model version");
}
}
備註
警告
這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。
屬性
Author |
已取代。 從模型取得作者資訊。 |
Description |
已取代。 取得模型的自訂描述。 |
Domain |
已取代。 取得模型的定義域資訊。 |
InputFeatures |
已取代。 取得模型的輸入描述。 |
Metadata |
已取代。 從模型取得中繼資料。 |
Name |
已取代。 取得模型的名稱。 |
OutputFeatures |
已取代。 取得模型的輸出描述。 |
Version |
已取代。 取得模型的版本資訊。 |