mickeysjm / R-BERT

Pytorch re-implementation of R-BERT model
GNU General Public License v3.0
67 stars 15 forks source link

Issue: IndexError: index out of range in self #5

Open alxhrzg opened 4 years ago

alxhrzg commented 4 years ago

Seems to be related to the added special tokens, can be fixed by adding: model.resize_token_embeddings(len(tokenizer)) See a related issue with BERT: https://github.com/huggingface/transformers/issues/4153

NONOThingC commented 4 years ago

This is aso helpful for IndexError: index out of range in self But it is strange that training in gpu seems dont have this problem.

alxhrzg commented 4 years ago

Yes indeed, I opened this issue in a hurry (before I forget) and actually meant IndexError: index out of range in self. I will adjust it accordingly!