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

适用于