codertimo / BERT-pytorch

Google AI 2018 BERT pytorch implementation
Apache License 2.0
6.11k stars 1.29k forks source link

segmentation fault #16

Closed yangze01 closed 5 years ago

yangze01 commented 5 years ago

When the code's Dataset class is modified, the error occurs. I try to debug the error, the code except at line: loss.backward(). image

codertimo commented 5 years ago

@yangze01 oh.. I'm sorry that you got an error... But I have no idea what just happend :( I think the CUDA is problem, not sure. Can you give me any clue, that I can help?

Thanx 👍

yangze01 commented 5 years ago

@codertimo Thank you very much. You are right, it's CUDA's problem. Your code with my own cooked data is running now. It's so cool to reproduce the BERT so quickly, thanks for your sharing!