def duplicate_batch(batch, tokenzier, args):
    '\n    句子进行重复\n    '
    new_batch = []
    for sentence in batch:
        new_batch.append(sentence)
        new_batch.append(sentence)
    batch_encoding = tokenzier(new_batch, padding=True, truncation=True, max_length=args.max_length, return_tensors='pt')
    return batch_encoding
句子进行重复
def duplicate_batch(batch, tokenzier, args):
    '\n    \n    '
    new_batch = []
    for sentence in batch:
        new_batch.append(sentence)
        new_batch.append(sentence)
    batch_encoding = tokenzier(new_batch, padding=True, truncation=True, max_length=args.max_length, return_tensors='pt')
    return batch_encoding