vliu15 / qanet

Tensorflow QANet with ELMo
15 stars 3 forks source link

Indexerror:list index out of range #4

Closed zhihongcheng closed 4 years ago

zhihongcheng commented 4 years ago

Excuse me. I had problems when training this code. when i run about 1000 steps the indexerror occurs. How can i solve this? Traceback (most recent call last): File "config.py", line 155, in tf.app.run() File "C:\Users\Administrator\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\platform\app.py", line 126, in run _sys.exit(main(argv)) File "config.py", line 136, in main train(config) File "E:\chengzhihong\qanet-master\main.py", line 81, in train model, config.val_num_batches, train_eval_file, sess, "train", handle, train_handle) File "E:\chengzhihong\qanet-master\main.py", line 119, in evaluate_batch eval_file, qa_id.tolist(), yp1.tolist(), yp2.tolist()) File "E:\chengzhihong\qanet-master\util.py", line 89, in convert_tokens end_idx = spans[p2][1] IndexError: list index out of range

zhihongcheng commented 4 years ago

Hope you could give a reply to me. Thanks