transformers
transformers copied to clipboard
TypeError: forward() got an unexpected keyword argument 'labels'
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.