Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tensorflow as tf
- gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.3)
- sess = tf.Session(config=tf.ConfigProto(gpu_options=gpu_options))
- # keras
- from keras.backend.tensorflow_backend import set_session
- config = tf.ConfigProto()
- config.gpu_options.per_process_gpu_memory_fraction = 0.1
- #config.gpu_options.allow_growth=True
- set_session(tf.Session(config=config))
Add Comment
Please, Sign In to add comment