Skip to content

Instantly share code, notes, and snippets.

@arjun-kava
Created August 14, 2018 05:36
Show Gist options
  • Select an option

  • Save arjun-kava/f13b8a1b81aa0241d4c3b55b14dd09cb to your computer and use it in GitHub Desktop.

Select an option

Save arjun-kava/f13b8a1b81aa0241d4c3b55b14dd09cb to your computer and use it in GitHub Desktop.

Revisions

  1. arjun-kava created this gist Aug 14, 2018.
    7 changes: 7 additions & 0 deletions fee_gpu_memory_keras.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    from keras import backend as K

    cfg = K.tf.ConfigProto()
    cfg.gpu_options.allow_growth = True
    K.set_session(K.tf.Session(config=cfg))

    K.clear_session()