Created
January 28, 2018 12:38
-
-
Save iamgroot42/5fff3f28e1f46a77ac6a9a41172a2d51 to your computer and use it in GitHub Desktop.
Dynamic memory allocation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
import keras | |
# Don't hog GPU | |
config = tf.ConfigProto() | |
config.gpu_options.allow_growth=True | |
sess = tf.Session(config=config) | |
# If using Keras, add this line: | |
keras.backend.set_session(sess) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment