Skip to content

Instantly share code, notes, and snippets.

@hgaiser
Created June 29, 2017 10:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgaiser/5718a62ed3a5ebb2f92fc2a45ab43130 to your computer and use it in GitHub Desktop.
Save hgaiser/5718a62ed3a5ebb2f92fc2a45ab43130 to your computer and use it in GitHub Desktop.
def get_session():
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
return tf.Session(config=config)
keras.backend.tensorflow_backend.set_session(get_session())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment