Memory usage in keras

I'm using keras2.0 and can't use the gpu when my model is on the training process. It gives me out of memory. How can I use gpu during training process?

kerasgpu
3 votesJW234.00
1 Answers
NN138.00
2

If you use Tensorflow as backend the you can change the configuration.

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))

https://github.com/keras-team/keras/issues/1538

Reply
Couldn't find what you were looking for?and we will find an expert to answer.
How helpful was this page?