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 命名空间。