Condividi tramite


LearningModelDeviceKindPreview Enumerazione

Definizione

Deprecato. Definisce l'elenco di costanti che rappresentano i tipi di dispositivo supportati da 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
Ereditarietà
LearningModelDeviceKindPreview
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10, version 1803 (è stato introdotto in 10.0.17134.0)
API contract
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (è stato introdotto in v1.0)

Campi

LearningDeviceAny 0

Valore defualt. Qualsiasi dispositivo.

LearningDeviceCpu 1

Processore centrale.

LearningDeviceDsp 4

Proccesor di segnale digitale.

LearningDeviceFpga 5

Matrice di gate programmabile a campo.

LearningDeviceGpu 2

Processore di grafica.

LearningDeviceNpu 3

Processore neurale.

Esempio

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

    model.InferencingOptions = options;
}

Commenti

Avviso

Si tratta di un'API deprecata. Usare invece lo spazio dei nomi Windows.AI.MachineLearning .

Si applica a