Skip to content

Instantly share code, notes, and snippets.

@mohapatras
Last active March 23, 2018 05:20
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 mohapatras/b6b1ebb3e738e72eb52b53a33b3fac9a to your computer and use it in GitHub Desktop.
Save mohapatras/b6b1ebb3e738e72eb52b53a33b3fac9a to your computer and use it in GitHub Desktop.
# memory growth options for keras and tensorflow.
from keras import backend as K
cfg = K.tf.ConfigProto()
cfg.gpu_options.allow_growth = True
K.set_session(K.tf.Session(config=cfg))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment