From 22a465a91fb4f3708c8c9437db8765e38fad8ae0 Mon Sep 17 00:00:00 2001 From: Yongbo Wang Date: Wed, 13 Mar 2019 09:42:06 +0800 Subject: [PATCH] Simplify code, delete redundancy line delete redundancy line `if args.train`, simplify code. --- examples/run_classifier.py | 1 - 1 file changed, 1 deletion(-) diff --git a/examples/run_classifier.py b/examples/run_classifier.py index f023a4cf20..238a49a836 100644 --- a/examples/run_classifier.py +++ b/examples/run_classifier.py @@ -594,7 +594,6 @@ def main(): optimizer.zero_grad() global_step += 1 - if args.do_train: # Save a trained model and the associated configuration model_to_save = model.module if hasattr(model, 'module') else model # Only save the model it-self output_model_file = os.path.join(args.output_dir, WEIGHTS_NAME)