Share via


LearningModelDeviceKindPreview Enum

Definition

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

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
Inheritance
LearningModelDeviceKindPreview
Attributes

Windows requirements

Device family
Windows 10, version 1803 (introduced in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v1.0)

Fields

Name Value Description
LearningDeviceAny 0

The defualt value. Any device.

LearningDeviceCpu 1

A central processor.

LearningDeviceGpu 2

A graphics processor.

LearningDeviceNpu 3

A neural processor.

LearningDeviceDsp 4

A digital signal proccesor.

LearningDeviceFpga 5

A field-programmable gate array.

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