From 4c148e6145ff8de10824a1b374c3a0be3b2ecbea Mon Sep 17 00:00:00 2001 From: xuezhong Date: Wed, 26 Sep 2018 22:54:55 +0800 Subject: [PATCH] change run.sh --- fluid/machine_reading_comprehesion/DuReader/run.py | 6 ++++-- fluid/machine_reading_comprehesion/DuReader/run.sh | 4 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fluid/machine_reading_comprehesion/DuReader/run.py b/fluid/machine_reading_comprehesion/DuReader/run.py index 1fb6fd4e..2f9d34db 100644 --- a/fluid/machine_reading_comprehesion/DuReader/run.py +++ b/fluid/machine_reading_comprehesion/DuReader/run.py @@ -385,8 +385,9 @@ def evaluate(logger, args): ] feeder = fluid.DataFeeder(feed_list, place) + inference_program = main_program.clone(for_test=True) eval_loss, bleu_rouge = validation( - main_program, avg_cost, s_probs, e_probs, + inference_program, avg_cost, s_probs, e_probs, feed_order, place, vocab, brc_data, logger, args) logger.info('Dev eval loss {}'.format(eval_loss)) logger.info('Dev eval result: {}'.format(bleu_rouge)) @@ -431,8 +432,9 @@ def predict(logger, args): ] feeder = fluid.DataFeeder(feed_list, place) + inference_program = main_program.clone(for_test=True) eval_loss, bleu_rouge = validation( - main_program, avg_cost, s_probs, e_probs, + inference_program, avg_cost, s_probs, e_probs, feed_order, place, vocab, brc_data, logger, args) diff --git a/fluid/machine_reading_comprehesion/DuReader/run.sh b/fluid/machine_reading_comprehesion/DuReader/run.sh index 076ec920..e3476074 100644 --- a/fluid/machine_reading_comprehesion/DuReader/run.sh +++ b/fluid/machine_reading_comprehesion/DuReader/run.sh @@ -17,6 +17,4 @@ python run.py \ --max_p_len 500 \ --max_q_len 60 \ --max_a_len 200 \ ---drop_rate 0.2 \ ---train \ ---test +--drop_rate 0.2 $@\ -- GitLab