Share via


InferencingOptionsPreview.MinimizeMemoryAllocation Property

Definition

Deprecated. Gets or sets whether to minimize memory allocation after model evaluation.

public:
 property bool MinimizeMemoryAllocation { bool get(); void set(bool value); };
bool MinimizeMemoryAllocation();

void MinimizeMemoryAllocation(bool 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")]
bool MinimizeMemoryAllocation();

void MinimizeMemoryAllocation(bool value);
public bool MinimizeMemoryAllocation { get; set; }
public bool MinimizeMemoryAllocation { [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 boolean = inferencingOptionsPreview.minimizeMemoryAllocation;
inferencingOptionsPreview.minimizeMemoryAllocation = boolean;
Public Property MinimizeMemoryAllocation As Boolean

Property Value

Boolean

bool

True if minimizing memory allocation during evaluation; otherwise false. The default is false.

Attributes

Examples

public void SetEvaluationOptionsForModel(LearningModelPreview model)
{
    InferencingOptionsPreview options = model.InferencingOptions;
    options.MinimizeMemoryAllocation = true;

    model.InferencingOptions = options;
}

Remarks

Warning

This is a deprecated API. Please use the Windows.AI.MachineLearning namespace instead.

Applies to