InferencingOptionsPreview Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Deprecated. Represents the inference options for controlling the evaluation of a model.
public ref class InferencingOptionsPreview sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
class InferencingOptionsPreview final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract, 65536)]
/// [Windows.Foundation.Metadata.Deprecated("Use LearningModelSession instead of InferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
class InferencingOptionsPreview final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
public sealed class InferencingOptionsPreview
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract), 65536)]
[Windows.Foundation.Metadata.Deprecated("Use LearningModelSession instead of InferencingOptionsPreview. For more info, see MSDN.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 131072, "Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract")]
public sealed class InferencingOptionsPreview
Public NotInheritable Class InferencingOptionsPreview
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10, version 1803 (introduced in 10.0.17134.0)
|
API contract |
Windows.AI.MachineLearning.Preview.MachineLearningPreviewContract (introduced in v1.0)
|
Examples
void SetEvaluationOptionsForModel(LearningModelPreview model)
{
// Set our preference to use the GPU
InferencingOptionsPreview options = model.InferencingOptions;
options.PreferredDeviceKind = LearningModelDeviceKindPreview.LearningDeviceGpu;
model.InferencingOptions = options;
}
Remarks
Warning
This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.
Properties
IsTracingEnabled |
Deprecated. Gets or sets whether tracing is enabled during model evaluation. |
MaxBatchSize |
Deprecated. Gets or sets the maximum batch size for model evaluation. |
MinimizeMemoryAllocation |
Deprecated. Gets or sets whether to minimize memory allocation after model evaluation. |
PreferredDeviceKind |
Deprecated. Gets or sets the preferred device that the evaluation will be performed on. |
ReclaimMemoryAfterEvaluation |
Deprecated. Gets or sets whether to reclaim allocated memory after the model evaluation. |