TabFormer icon indicating copy to clipboard operation
TabFormer copied to clipboard

Issue in TransDataCollatorForLanguageModeling

Open JulinaM opened this issue 3 years ago • 2 comments

AttributeError: 'TransDataCollatorForLanguageModeling' object has no attribute '_tensorize_batch'

JulinaM avatar Feb 12 '22 21:02 JulinaM

I replaced that line with

if isinstance(examples[0], (list, tuple, np.ndarray)):
    examples = [torch.tensor(e, dtype=torch.long) for e in examples]

and it does what (i think) is supposed to happen

ianbenlolo avatar Jul 20 '22 17:07 ianbenlolo