Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

GPU allow growth configuration problem #333

Open
hkhpub opened this issue Aug 3, 2018 · 0 comments
Open

GPU allow growth configuration problem #333

hkhpub opened this issue Aug 3, 2018 · 0 comments

Comments

@hkhpub
Copy link

hkhpub commented Aug 3, 2018

I added --gpu_allow_growth True, but the program still allocates all the available memory.
The following code should be a temporal workaround.

  session_config = tf.ConfigProto()
  session_config.gpu_options.allow_growth = FLAGS.gpu_allow_growth
  session_config.gpu_options.per_process_gpu_memory_fraction = FLAGS.gpu_memory_fraction
  config = run_config.RunConfig(
      tf_random_seed=FLAGS.tf_random_seed,
      save_checkpoints_secs=FLAGS.save_checkpoints_secs,
      save_checkpoints_steps=FLAGS.save_checkpoints_steps,
      keep_checkpoint_max=FLAGS.keep_checkpoint_max,
      keep_checkpoint_every_n_hours=FLAGS.keep_checkpoint_every_n_hours,
      session_config=session_config)
  config.tf_config.log_device_placement = FLAGS.log_device_placement

I open this issue for those who face similar problem like me.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant