|
When I use tensorflow as backend I got an high memory usage on my GPUs. I check that is possible to limit memory usage by using `tf.ConfigProto`
```shell
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)
```
would it be useful to add this option in keras? if yes where is the best place to do it without corrupt keras design principles?
You can configure and pass a tensorflow session to 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))
```
On the other hand I can't find it in the documentation, so I don't know if that's a stable feature. (I just finally thought of looking for `ConfigProto` in the source to see if I could "fix" this problem for myself.)
|
|