From 58b986603f77002e3cd19d122404da09845d1f67 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Thu, 9 Aug 2018 08:44:15 +0000 Subject: [PATCH] Use double quotes for environ variable --- fluid/text_classification/train.py | 4 ++-- fluid/text_classification/utils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fluid/text_classification/train.py b/fluid/text_classification/train.py index ea3e43f5..9078f478 100644 --- a/fluid/text_classification/train.py +++ b/fluid/text_classification/train.py @@ -55,7 +55,7 @@ def train(train_reader, feeder = fluid.DataFeeder(feed_list=[data, label], place=place) # For internal continuous evaluation - if 'CE_MODE_X' in os.environ: + if "CE_MODE_X" in os.environ: fluid.default_startup_program().random_seed = 110 exe.run(fluid.default_startup_program()) for pass_id in xrange(pass_num): @@ -80,7 +80,7 @@ def train(train_reader, pass_end = time.time() # For internal continuous evaluation - if 'CE_MODE_X' in os.environ: + if "CE_MODE_X" in os.environ: print("kpis train_acc %f" % avg_acc) print("kpis train_cost %f" % avg_cost) print("kpis train_duration %f" % (pass_end - pass_start)) diff --git a/fluid/text_classification/utils.py b/fluid/text_classification/utils.py index 874679c3..3c2fc559 100644 --- a/fluid/text_classification/utils.py +++ b/fluid/text_classification/utils.py @@ -65,7 +65,7 @@ def prepare_data(data_type="imdb", raise RuntimeError("No such dataset") if data_type == "imdb": - if 'CE_MODE_X' in os.environ: + if "CE_MODE_X" in os.environ: train_reader = paddle.batch( paddle.dataset.imdb.train(word_dict), batch_size=batch_size) -- GitLab