未验证 提交 c7a1c889 编写于 作者: X Xin Pan 提交者: GitHub

Merge pull request #741 from panyx0718/use_program_cache

Add program caching
...@@ -140,7 +140,8 @@ def main(): ...@@ -140,7 +140,8 @@ def main():
lr_scheduler.update_learning_rate(data_input) lr_scheduler.update_learning_rate(data_input)
outs = exe.run(fluid.framework.default_main_program(), outs = exe.run(fluid.framework.default_main_program(),
feed=data_input, feed=data_input,
fetch_list=[cost]) fetch_list=[cost],
use_program_cache=True)
cost_val = np.array(outs[0]) cost_val = np.array(outs[0])
print("pass_id = " + str(pass_id) + " batch = " + str(batch_id) + print("pass_id = " + str(pass_id) + " batch = " + str(batch_id) +
" cost = " + str(cost_val)) " cost = " + str(cost_val))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册