提交 1f64e6a5 编写于 作者: Y Yibing Liu

Replace feed_dict by feed

上级 991e6c25
...@@ -220,8 +220,7 @@ def train_parallel_exe(args, ...@@ -220,8 +220,7 @@ def train_parallel_exe(args,
test_info = [[], [], []] test_info = [[], [], []]
for batch_id, data in enumerate(train_reader()): for batch_id, data in enumerate(train_reader()):
t1 = time.time() t1 = time.time()
loss, acc1, acc5 = train_exe.run(fetch_list, loss, acc1, acc5 = train_exe.run(fetch_list, feed=feeder.feed(data))
feed_dict=feeder.feed(data))
t2 = time.time() t2 = time.time()
period = t2 - t1 period = t2 - t1
loss = np.mean(np.array(loss)) loss = np.mean(np.array(loss))
...@@ -243,8 +242,7 @@ def train_parallel_exe(args, ...@@ -243,8 +242,7 @@ def train_parallel_exe(args,
train_acc5 = np.array(train_info[2]).mean() train_acc5 = np.array(train_info[2]).mean()
for data in test_reader(): for data in test_reader():
t1 = time.time() t1 = time.time()
loss, acc1, acc5 = test_exe.run(fetch_list, loss, acc1, acc5 = test_exe.run(fetch_list, feed=feeder.feed(data))
feed_dict=feeder.feed(data))
t2 = time.time() t2 = time.time()
period = t2 - t1 period = t2 - t1
loss = np.mean(np.array(loss)) loss = np.mean(np.array(loss))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册