From a492bae655bf34816a9346c50c8f8742a39e3eae Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Fri, 19 Apr 2019 04:28:53 +0000 Subject: [PATCH] Tiny fixes in squad --- BERT/run_squad.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BERT/run_squad.py b/BERT/run_squad.py index 9607a8b..f93c7bf 100644 --- a/BERT/run_squad.py +++ b/BERT/run_squad.py @@ -241,7 +241,7 @@ def train(args): data_path=args.train_file, batch_size=args.batch_size, phase='train', - shuffle=False, + shuffle=True, dev_count=dev_count, version_2_with_negative=args.version_2_with_negative, epoch=args.epoch) @@ -396,7 +396,7 @@ def train(args): total_cost, total_num_seqs = [], [] time_begin = time.time() - if steps % args.save_steps == 0: + if steps % args.save_steps == 0 or steps == max_train_steps: save_path = os.path.join(args.checkpoints, "step_" + str(steps)) fluid.io.save_persistables(exe, save_path, train_program) -- GitLab