"...examples/git@developer.sourcefind.cn:OpenDAS/ollama.git" did not exist on "1b51655e47b5f01d638b2a11c57e67156c40c6da"
Commit a0de5ca9 authored by kaiix's avatar kaiix
Browse files

Use soft device placement in the training session

parent dab1517e
...@@ -94,7 +94,8 @@ def _Train(model, data_batcher): ...@@ -94,7 +94,8 @@ def _Train(model, data_batcher):
save_summaries_secs=60, save_summaries_secs=60,
save_model_secs=FLAGS.checkpoint_secs, save_model_secs=FLAGS.checkpoint_secs,
global_step=model.global_step) global_step=model.global_step)
sess = sv.prepare_or_wait_for_session() sess = sv.prepare_or_wait_for_session(config=tf.ConfigProto(
allow_soft_placement=True))
running_avg_loss = 0 running_avg_loss = 0
step = 0 step = 0
while not sv.should_stop() and step < FLAGS.max_run_steps: while not sv.should_stop() and step < FLAGS.max_run_steps:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment