From 1f64e6a5331a28dd2a39449438b15c2235775aeb Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Wed, 25 Apr 2018 02:54:20 -0700 Subject: [PATCH] Replace feed_dict by feed --- fluid/image_classification/train.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fluid/image_classification/train.py b/fluid/image_classification/train.py index 6244e520..4f126428 100644 --- a/fluid/image_classification/train.py +++ b/fluid/image_classification/train.py @@ -220,8 +220,7 @@ def train_parallel_exe(args, test_info = [[], [], []] for batch_id, data in enumerate(train_reader()): t1 = time.time() - loss, acc1, acc5 = train_exe.run(fetch_list, - feed_dict=feeder.feed(data)) + loss, acc1, acc5 = train_exe.run(fetch_list, feed=feeder.feed(data)) t2 = time.time() period = t2 - t1 loss = np.mean(np.array(loss)) @@ -243,8 +242,7 @@ def train_parallel_exe(args, train_acc5 = np.array(train_info[2]).mean() for data in test_reader(): t1 = time.time() - loss, acc1, acc5 = test_exe.run(fetch_list, - feed_dict=feeder.feed(data)) + loss, acc1, acc5 = test_exe.run(fetch_list, feed=feeder.feed(data)) t2 = time.time() period = t2 - t1 loss = np.mean(np.array(loss)) -- GitLab