Shortcuts

data.buffer.middleware.group_sample

group_sample

group_sample

ding.data.buffer.middleware.group_sample.group_sample(size_in_group: int, ordered_in_group: bool = True, max_use_in_group: bool = True) Callable[source]
Overview:

中间件设计用于在从缓冲区采样后处理每组数据。

Arguments:
  • size_in_group (int): 每组中的样本大小。

  • ordered_in_group (bool): 是否保持记录的原始顺序,默认为true。

  • max_use_in_group (bool): 是否尽可能多地使用每组中的数据,默认为true。