《实验细节》如何使用collate_fn统一一个batch中句子的长度 前言 代码举例 前言 之前在写代码时总是使用 encode_pair = tokenizer.batch_encode_plus( sents, truncation=True, padding='max_length', max_length=100, return_tensors=