RuntimeError: copy_if failed to synchronize: cudaErrorAssert: device-side assert triggered
AndDoIt opened this issue · 4 comments
The affected code line extracts the classifier token's ([CLS]) embedding. The [CLS] token is added during dataset loading (see input_reader.py
file). I'm not sure why the error occurs with your dataset. Maybe you already include the [CLS] token in your dataset JSON file? And are you sure no other character (or subword) is mapped to the same ID as [CLS] (in your vocabulary)?
Thanks for your reply very much!
Following your guide, I checked _parse_tokens function in input_reader.py with doc_encoding.count(101), and there is only 1 [CLS] token. Since I have 35 kinds of relations and 25 kinds of entities, the actual affected code line is self.size_embeddings = nn.Embedding(100, size_embedding), and I changed 100 to my max_sent_len of 200, then it has solved.
Okay, thank you!
I'll leave this issue open till I added the maximum size embedding count as a configuration parameter.