LearningModelDeviceKindPreview Перечисление

Определение

Не рекомендуется. Определяет список констант, представляющих поддерживаемые типы устройств Машинного обучения Windows.

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
Наследование
LearningModelDeviceKindPreview
Атрибуты

Требования к Windows

Семейство устройств
Windows 10, version 1803 (появилось в 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (появилось в v1.0)

Поля

LearningDeviceAny 0

Несуществующее значение. Любое устройство.

LearningDeviceCpu 1

Центральный процессор.

LearningDeviceDsp 4

Цифровой прокксатор сигнала.

LearningDeviceFpga 5

Программируемый полем вентитный массив.

LearningDeviceGpu 2

Графический процессор.

LearningDeviceNpu 3

Нейронный процессор.

Примеры

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

    model.InferencingOptions = options;
}

Комментарии

Предупреждение

Это нерекомендуемый API. Вместо этого используйте пространство имен Windows.AI.MachineLearning .

Применяется к