Freigeben über


LearningModelPreview.InferencingOptions Eigenschaft

Definition

Veraltet. Ruft die Rückschlussoptionen für die Auswertung eines Modells ab oder legt diese fest.

public:
 property InferencingOptionsPreview ^ InferencingOptions { InferencingOptionsPreview ^ get(); void set(InferencingOptionsPreview ^ value); };
InferencingOptionsPreview InferencingOptions();

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

void InferencingOptions(InferencingOptionsPreview value);
public InferencingOptionsPreview InferencingOptions { get; set; }
public InferencingOptionsPreview InferencingOptions { [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] get; [Windows.Foundation.Metadata.Deprecated("Use ILearningModel instead of ILearningModelPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")] set; }
var inferencingOptionsPreview = learningModelPreview.inferencingOptions;
learningModelPreview.inferencingOptions = inferencingOptionsPreview;
Public Property InferencingOptions As InferencingOptionsPreview

Eigenschaftswert

Die Rückschlussoptionen für die Auswertung eines Modells.

Attribute

Beispiele

public async Task LoadModelAsync()
{
	// Load Model
    var modelFile = await Windows.ApplicationModel.Package.Current.InstalledLocation.GetFileAsync("model.onnx");
    LearningModelPreview model = await LearningModelPreview.LoadModelFromStorageFileAsync(modelFile);


	//Set inferencing options to use GPU
	InferencingOptionsPreview options = model.InferencingOptions;
	options.PreferredDeviceKind = LearningModelDeviceKindPreview.LearningDeviceCpu;
	model.InferencingOptions = options;
}

Hinweise

Warnung

Dies ist eine veraltete API. Verwenden Sie stattdessen den Windows.AI.MachineLearning-Namespace .

Gilt für: