transformers-tutorials icon indicating copy to clipboard operation
transformers-tutorials copied to clipboard

transformers_multi_label_classification.ipynb issue

Open tang-john opened this issue 2 years ago • 0 comments

https://github.com/abhimishra91/transformers-tutorials/blob/master/transformers_multi_label_classification.ipynb

The BertClass forward function is causing the following error message:

TypeError: dropout(): argument 'input' (position 1) must be Tensor, not str

It looks like the notebook contains version 3 code. How to migrate it to version 4?

https://stackoverflow.com/questions/65082243/dropout-argument-input-position-1-must-be-tensor-not-str-when-using-bert

https://huggingface.co/docs/transformers/migration

tang-john avatar Jun 17 '22 18:06 tang-john