Collator#

class Collator[源代码]#

用于将一个列表中的样本合并成 mini-batch 形式的 Tensor. 方便从数据集中分批次加载数据。原始实现来自:pytorch/pytorch