共用方式為


InferencingOptionsPreview.MaxBatchSize 屬性

定義

已取代。 取得或設定模型評估的最大批次大小。

public:
 property int MaxBatchSize { int get(); void set(int value); };
int MaxBatchSize();

void MaxBatchSize(int 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")]
int MaxBatchSize();

void MaxBatchSize(int value);
public int MaxBatchSize { get; set; }
public int MaxBatchSize { [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 int32 = inferencingOptionsPreview.maxBatchSize;
inferencingOptionsPreview.maxBatchSize = int32;
Public Property MaxBatchSize As Integer

屬性值

Int32

int

批次大小上限。 預覽 API 僅支援批次處理大小 1。

屬性

範例

public void SetEvaluationOptionsForModel(LearningModelPreview model)
{
    InferencingOptionsPreview options = model.InferencingOptions;
    options.MaxBatchSize = 2;

    model.InferencingOptions = options;
}

備註

警告

這是已被取代的 API。 請改用 Windows.AI.MachineLearning 命名空間。

適用於