Skip to content

Commit

Permalink
Merge pull request #741 from panyx0718/use_program_cache
Browse files Browse the repository at this point in the history
Add program caching
  • Loading branch information
panyx0718 committed Mar 19, 2018
2 parents d224397 + 82ed838 commit c7a1c88
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fluid/neural_machine_translation/transformer/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def main():
lr_scheduler.update_learning_rate(data_input)
outs = exe.run(fluid.framework.default_main_program(),
feed=data_input,
fetch_list=[cost])
fetch_list=[cost],
use_program_cache=True)
cost_val = np.array(outs[0])
print("pass_id = " + str(pass_id) + " batch = " + str(batch_id) +
" cost = " + str(cost_val))
Expand Down

0 comments on commit c7a1c88

Please sign in to comment.