Partager via


InferencingOptionsPreview.MinimizeMemoryAllocation Propriété

Définition

Action déconseillée. Obtient ou définit s’il faut réduire l’allocation de mémoire après l’évaluation du modèle.

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

Valeur de propriété

Boolean

bool

True si vous réduisez l’allocation de mémoire pendant l’évaluation ; sinon, false. La valeur par défaut est false.

Attributs

Exemples

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

    model.InferencingOptions = options;
}

Remarques

Avertissement

Il s’agit d’une API déconseillée. Utilisez plutôt l’espace de noms Windows.AI.MachineLearning .

S’applique à