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

TypeError: forward() got an unexpected keyword argument 'labels' #12

Open
Document-Data-Analyst opened this issue Dec 7, 2021 · 0 comments

Comments

@Document-Data-Analyst
Copy link

Document-Data-Analyst commented Dec 7, 2021

In NSP training program, when training starts the TypeError occurs in the following line of code,

outputs = model(input_ids, attention_mask=attention_mask, token_type_ids=token_type_ids, labels=labels)

The Error shows as follows:
/...../site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
TypeError: forward() got an unexpected keyword argument 'labels'

I reinstalled torch's latest version, even then I am getting this error. Need help to start training.

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

1 participant