Created
May 30, 2018 02:33
-
-
Save ruslangrimov/6f91c6ba679e19f0334645aa0862ccc9 to your computer and use it in GitHub Desktop.
Make Keras use only a fraction of GPU memory
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 | |
from keras.backend.tensorflow_backend import set_session | |
config = tf.ConfigProto() | |
config.gpu_options.per_process_gpu_memory_fraction = 0.33 | |
set_session(tf.Session(config=config)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment