Partager via


LearningModelDeviceKindPreview Énumération

Définition

Action déconseillée. Définit la liste des constantes représentant les types d’appareils pris en charge par 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
Héritage
LearningModelDeviceKindPreview
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10, version 1803 (introduit dans 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduit dans v1.0)

Champs

LearningDeviceAny 0

Valeur defualt. N’importe quel appareil.

LearningDeviceCpu 1

Processeur central.

LearningDeviceDsp 4

Processus de signal numérique.

LearningDeviceFpga 5

Tableau de portes programmables de champ.

LearningDeviceGpu 2

Processeur graphique.

LearningDeviceNpu 3

Processeur neuronal.

Exemples

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

    model.InferencingOptions = options;
}

Remarques

Avertissement

Il s’agit d’une API déconseillée. Utilisez plutôt l’espace de noms Windows.AI.MachineLearning .

S’applique à