Compartilhar via


LearningModelDeviceKindPreview Enumeração

Definição

Preterido. Define a lista de constantes que representam os tipos de dispositivo com suporte do 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
Herança
LearningModelDeviceKindPreview
Atributos

Requisitos do Windows

Família de dispositivos
Windows 10, version 1803 (introduzida na 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduzida na v1.0)

Campos

LearningDeviceAny 0

O valor defualt. Qualquer dispositivo.

LearningDeviceCpu 1

Um processador central.

LearningDeviceDsp 4

Um proccesor de sinal digital.

LearningDeviceFpga 5

Uma matriz de portão programável por campo.

LearningDeviceGpu 2

Um processador gráfico.

LearningDeviceNpu 3

Um processador neural.

Exemplos

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

    model.InferencingOptions = options;
}

Comentários

Aviso

Essa é uma API preterida. Use o namespace Windows.AI.MachineLearning .

Aplica-se a