From 6ba4732bea3d0c7b32c5b81d605190dbafec0455 Mon Sep 17 00:00:00 2001 From: xuezhong Date: Fri, 5 Apr 2019 16:42:02 +0800 Subject: [PATCH] fix bug for test --- PaddleNLP/ELMO/args.py | 2 +- PaddleNLP/ELMO/run.sh | 1 + PaddleNLP/ELMO/train.py | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PaddleNLP/ELMO/args.py b/PaddleNLP/ELMO/args.py index 53bc0191..8653cc03 100755 --- a/PaddleNLP/ELMO/args.py +++ b/PaddleNLP/ELMO/args.py @@ -94,7 +94,7 @@ def parse_args(): parser.add_argument('--cell_clip', type=float, default=3.0) parser.add_argument('--max_epoch', type=float, default=10) parser.add_argument('--local', type=bool, default=False) - parser.add_argument('--shuffle', type=bool, default=False) + parser.add_argument('--shuffle', type=bool, default=True) parser.add_argument('--use_custom_samples', type=bool, default=False) parser.add_argument('--para_save_dir', type=str, default='model_new') parser.add_argument('--train_path', type=str, default='') diff --git a/PaddleNLP/ELMO/run.sh b/PaddleNLP/ELMO/run.sh index 1edf9097..888f0203 100755 --- a/PaddleNLP/ELMO/run.sh +++ b/PaddleNLP/ELMO/run.sh @@ -5,4 +5,5 @@ python train.py \ --vocab_path baike/vocabulary_min5k.txt \ --learning_rate 0.2 \ --use_gpu True \ +--shuffle True \ --local True $@ diff --git a/PaddleNLP/ELMO/train.py b/PaddleNLP/ELMO/train.py index 4f4a346e..584fb119 100755 --- a/PaddleNLP/ELMO/train.py +++ b/PaddleNLP/ELMO/train.py @@ -578,7 +578,6 @@ def train_loop(args, end_time = time.time() total_time += end_time - start_time - logger.info("train ppl {}".format(ppl)) if epoch_id == args.max_epoch - 1 and args.enable_ce: logger.info("lstm_language_model_duration\t%s" % -- GitLab