diff --git a/fluid/sequence_tagging_for_ner/train.py b/fluid/sequence_tagging_for_ner/train.py index 6ed77cd5ca1d504a8b79b4f87349242b5051c539..8aaf660f35aa63b7d298d1d380b579a66f421de7 100644 --- a/fluid/sequence_tagging_for_ner/train.py +++ b/fluid/sequence_tagging_for_ner/train.py @@ -53,7 +53,7 @@ def main(train_data_file, test_data_file, vocab_file, target_file, emb_file, chunk_scheme="IOB", num_chunk_types=int(math.ceil((label_dict_len - 1) / 2.0))) - inference_program = fluid.default_main_program().clone() + inference_program = fluid.default_main_program().clone(for_test=True) with fluid.program_guard(inference_program): test_target = chunk_evaluator.metrics + chunk_evaluator.states inference_program = fluid.io.get_inference_program(test_target) diff --git a/fluid/text_classification/.run_ce.sh b/fluid/text_classification/.run_ce.sh old mode 100644 new mode 100755 diff --git a/fluid/text_classification/_ce.py b/fluid/text_classification/_ce.py index 61584e740fb8e5fb9ed1386884b804761666ecc3..100357204db7f3a8d0c1d3cbcbdc707410b20023 100644 --- a/fluid/text_classification/_ce.py +++ b/fluid/text_classification/_ce.py @@ -9,7 +9,7 @@ from kpi import CostKpi, DurationKpi, AccKpi train_acc_kpi = AccKpi('train_acc', 0.005, actived=True) train_cost_kpi = CostKpi('train_cost', 0.005, actived=True) -train_duration_kpi = DurationKpi('train_duration', 0.06, actived=True) +train_duration_kpi = DurationKpi('train_duration', 0.05, actived=True) tracking_kpis = [ train_acc_kpi, @@ -43,6 +43,6 @@ def log_to_ce(log): if __name__ == '__main__': log = sys.stdin.read() print("*****") - print log + print(log) print("****") log_to_ce(log)