LearningModelPreview 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
已取代。 表示機器學習模型。
public ref class LearningModelPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class LearningModelPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class LearningModelPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class LearningModelPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of LearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class LearningModelPreview
Public NotInheritable Class LearningModelPreview
- 繼承
- 屬性
Windows 需求
裝置系列 |
Windows 10, version 1803 (已於 10.0.17134.0 引進)
|
API contract |
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (已於 v1.0 引進)
|
範例
public async Task LoadModel()
{
var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);
...
}
備註
警告
這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。
屬性
Description |
已取代。 取得定型機器學習模型的描述性中繼資料。 |
InferencingOptions |
已取代。 取得或設定模型的評估推斷選項。 |
方法
EvaluateAsync(LearningModelBindingPreview, String) |
已取代。 使用系 結中已系結的功能值,以非同步方式評估機器學習模型。 |
EvaluateFeaturesAsync(IMap<String,Object>, String) |
已取代。 以非同步方式評估名稱變數實例作為模型的輸入和輸出。 |
LoadModelFromStorageFileAsync(IStorageFile) |
已取代。 以非同步方式從檔案儲存體載入模型。 |
LoadModelFromStreamAsync(IRandomAccessStreamReference) |
已取代。 以非同步方式從提供的資料流程載入模型。 |