Bagikan melalui


LearningModelDeviceKindPreview Enum

Definisi

Dihentikan. Menentukan daftar konstanta yang mewakili jenis perangkat yang didukung Windows Machine Learning.

public enum class LearningModelDeviceKindPreview
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
enum class LearningModelDeviceKindPreview
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModelDeviceKind instead of LearningModelDeviceKindPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
enum class LearningModelDeviceKindPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public enum LearningModelDeviceKindPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModelDeviceKind instead of LearningModelDeviceKindPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public enum LearningModelDeviceKindPreview
var value = Windows.AI.MachineLearning.Preview.LearningModelDeviceKindPreview.learningDeviceAny
Public Enum LearningModelDeviceKindPreview
Warisan
LearningModelDeviceKindPreview
Atribut

Persyaratan Windows

Rangkaian perangkat
Windows 10, version 1803 (diperkenalkan dalam 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (diperkenalkan dalam v1.0)

Bidang

LearningDeviceAny 0

Nilai defualt. Perangkat apa pun.

LearningDeviceCpu 1

Prosesor pusat.

LearningDeviceDsp 4

Proccesor sinyal digital.

LearningDeviceFpga 5

Array gerbang yang dapat diprogram bidang.

LearningDeviceGpu 2

Prosesor grafis.

LearningDeviceNpu 3

Prosesor neural.

Contoh

void SetEvaluationOptionsForModel(LearningModelPreview model)
{
    // Set our preference to use the GPU
    InferencingOptionsPreview options = model.InferencingOptions;
    options.PreferredDeviceKind = LearningModelDeviceKindPreview.LearningDeviceGpu;

    model.InferencingOptions = options;
}

Keterangan

Peringatan

Ini adalah API yang tidak digunakan lagi. Silakan gunakan namespace Windows.AI.MachineLearning sebagai gantinya.

Berlaku untuk