Created
December 24, 2018 05:04
-
-
Save arjun-kava/175e8a5d2766e629c90a44020139615c to your computer and use it in GitHub Desktop.
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
#### KERAS #### | |
import tensorflow as tf | |
from keras.backend.tensorflow_backend import set_session | |
config = tf.ConfigProto() | |
config.gpu_options.per_process_gpu_memory_fraction = 0.3 | |
set_session(tf.Session(config=config)) | |
#### TF #### | |
config = tf.ConfigProto( | |
gpu_options = tf.GPUOptions(per_process_gpu_memory_fraction=0.5), | |
device_count = {'GPU': 1} | |
) | |
sess_1 = tf.Session(graph=graph_1, config=config) | |
sess_2 = tf.Session(graph=graph_2, config=config) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment