LearningModelDeviceKindPreview Enum

Definition

Deprecated. Defines the list of constants representing Windows Machine Learning supported device kinds.

public enum class LearningModelDeviceKindPreview
enum 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
Inheritance
LearningModelDeviceKindPreview
Attributes

Windows 10 requirements

Device family
Windows 10, version 1809 (introduced in 10.0.17763.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v2.0)

Fields

LearningDeviceAny 0

The defualt value. Any device.

LearningDeviceCpu 1

A central processor.

LearningDeviceDsp 4

A digital signal proccesor.

LearningDeviceFpga 5

A field-programmable gate array.

LearningDeviceGpu 2

A graphics processor.

LearningDeviceNpu 3

A neural processor.

Examples

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

    model.InferencingOptions = options;
}

Remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.

Applies to