Skip to content

Instantly share code, notes, and snippets.

@hgaiser
Created June 29, 2017 10:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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