utterworks / fast-bert

Super easy library for BERT based NLP models
Apache License 2.0
1.85k stars 342 forks source link

indexSelectLargeIndex Error here #250

Closed samaritanhu closed 3 years ago

samaritanhu commented 3 years ago

Hi, thanks for your contribution and I really love your repo.

I have this question. My dataset was like this:

sentence label 0\tABC\t1 1\tDEF\t0

My label.csv was like this

0 1

Then I got this output when I was running

predictor = BertClassificationPredictor( model_path=MODEL_PATH, label_path=LABEL_PATH, # location for labels.csv file multi_label=False, model_type='xlnet', do_lower_case=False)

Error information:

/pytorch/aten/src/THC/THCTensorIndex.cu:272: indexSelectLargeIndex: block: [22,0,0], thread: [37,0,0] Assertion srcIndex < srcSelectDimSize failed.