machine_reading_comprehension 训练报错
Created by: zhengya01
sh run.sh --train
2019-04-05 10:49:46,316 - brc - INFO - Running with args : Namespace(batch_size=32, dev_interval=-1, devset=['data/demo/devset/search.dev.json'], doc_num=5, drop_rate=0.0, embed_size=300, enable_ce=False, evaluate=False, hidden_size=150, learning_rate=0.001, load_dir='', log_interval=50, log_path=None, max_a_len=200, max_p_len=500, max_p_num=5, max_q_len=60, optim='adam', para_print=False, pass_num=5, predict=False, prepare=False, random_seed=123, result_dir='data/results/', result_name='test_result', save_dir='data/models', save_interval=1, testset=['data/demo/testset/search.test.json'], train=True, trainset=['data/demo/trainset/search.train.json'], use_gpu=True, vocab_dir='data/vocab', weight_decay=0.0001) 2019-04-05 10:49:46,316 - INFO - Running with args : Namespace(batch_size=32, dev_interval=-1, devset=['data/demo/devset/search.dev.json'], doc_num=5, drop_rate=0.0, embed_size=300, enable_ce=False, evaluate=False, hidden_size=150, learning_rate=0.001, load_dir='', log_interval=50, log_path=None, max_a_len=200, max_p_len=500, max_p_num=5, max_q_len=60, optim='adam', para_print=False, pass_num=5, predict=False, prepare=False, random_seed=123, result_dir='data/results/', result_name='test_result', save_dir='data/models', save_interval=1, testset=['data/demo/testset/search.test.json'], train=True, trainset=['data/demo/trainset/search.train.json'], use_gpu=True, vocab_dir='data/vocab', weight_decay=0.0001) 2019-04-05 10:49:46,317 - brc - INFO - Load data_set and vocab... 2019-04-05 10:49:46,317 - INFO - Load data_set and vocab... 2019-04-05 10:50:47,535 - brc - INFO - vocab size is 576278 and embed dim is 300 2019-04-05 10:50:47,535 - INFO - vocab size is 576278 and embed dim is 300 2019-04-05 10:50:47,640 - brc - INFO - Train set size: 95 questions. 2019-04-05 10:50:47,640 - INFO - Train set size: 95 questions. 2019-04-05 10:50:47,942 - brc - INFO - Dev set size: 100 questions. 2019-04-05 10:50:47,942 - INFO - Dev set size: 100 questions. 2019-04-05 10:42:52,829 - brc - INFO - Dev eval loss 10.7250499725 2019-04-05 10:42:52,829 - INFO - Dev eval loss 10.7250499725 2019-04-05 10:42:52,830 - brc - INFO - Dev eval result: {'Bleu-4': 6.516822191519035e-11, 'Rouge-L': 0.04326856861704951, 'Bleu-1': 1.1046810984229843e-10, 'Bleu-3': 7.277572299241399e-11, 'Bleu-2': 8.682206995432063e-11} 2019-04-05 10:42:52,830 - INFO - Dev eval result: {'Bleu-4': 6.516822191519035e-11, 'Rouge-L': 0.04326856861704951, 'Bleu-1': 1.1046810984229843e-10, 'Bleu-3': 7.277572299241399e-11, 'Bleu-2': 8.682206995432063e-11} Traceback (most recent call last): File "run.py", line 648, in train(logger, args) File "run.py", line 473, in train pass_id, "%.10f" % (1.0 * total_loss / total_num))) ZeroDivisionError: float division by zero