InferencingOptionsPreview.IsTracingEnabled 属性

定义

已弃用。 获取或设置在模型评估期间是否启用跟踪。

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

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

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

属性值

Boolean

bool

如果启用跟踪,则为 True;否则为 false。 默认值为 false。

属性

示例

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

    model.InferencingOptions = options;
}

注解

警告

这是一个已弃用的 API。 请改用 Windows.AI.MachineLearning 命名空间。

适用于