次の方法で共有


InferencingOptionsPreview.ReclaimMemoryAfterEvaluation プロパティ

定義

非推奨になりました。 モデルの評価後に割り当てられたメモリを再利用するかどうかを取得または設定します。

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

void ReclaimMemoryAfterEvaluation(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 ReclaimMemoryAfterEvaluation();

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

プロパティ値

Boolean

bool

True の 場合は、評価後に割り当てられたメモリを再利用します。それ以外の場合は false。 既定値は false です。

属性

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

    model.InferencingOptions = options;
}

注釈

警告

これは非推奨の API です。 代わりに Windows.AI.MachineLearning 名前空間を 使用してください。

適用対象