InferencingOptionsPreview.ReclaimMemoryAfterEvaluation 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
已取代。 取得或設定是否要在模型評估之後回收配置的記憶體。
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 命名空間。