共用方式為


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

適用於