Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in TransDataCollatorForLanguageModeling #26

Open
JulinaM opened this issue Feb 12, 2022 · 1 comment
Open

Issue in TransDataCollatorForLanguageModeling #26

JulinaM opened this issue Feb 12, 2022 · 1 comment

Comments

@JulinaM
Copy link

JulinaM commented Feb 12, 2022

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

@ianbenlolo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants