Compartir a través de


InferencingOptionsPreview.PreferredDeviceKind Propiedad

Definición

En desuso. Obtiene o establece el dispositivo preferido en el que se realizará la evaluación.

public:
 property LearningModelDeviceKindPreview PreferredDeviceKind { LearningModelDeviceKindPreview get(); void set(LearningModelDeviceKindPreview value); };
LearningModelDeviceKindPreview PreferredDeviceKind();

void PreferredDeviceKind(LearningModelDeviceKindPreview value);
/// [get: Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of IInferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
/// [set: Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of IInferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
LearningModelDeviceKindPreview PreferredDeviceKind();

void PreferredDeviceKind(LearningModelDeviceKindPreview value);
public LearningModelDeviceKindPreview PreferredDeviceKind { get; set; }
public LearningModelDeviceKindPreview PreferredDeviceKind { [Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of IInferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; [Windows.Foundation.Metadata.Deprecated("Use LearningModel instead of IInferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] set; }
var learningModelDeviceKindPreview = inferencingOptionsPreview.preferredDeviceKind;
inferencingOptionsPreview.preferredDeviceKind = learningModelDeviceKindPreview;
Public Property PreferredDeviceKind As LearningModelDeviceKindPreview

Valor de propiedad

El dispositivo preferido. El valor predeterminado es LearningDeviceAny.

Atributos

Ejemplos

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

    model.InferencingOptions = options;
}

Comentarios

Advertencia

Se trata de una API en desuso. Use el espacio de nombres Windows.AI.MachineLearning en su lugar.

Se aplica a