Created
May 22, 2019 02:51
-
-
Save bhuiyanmobasshir94/2d03ab070d68f18b4721a94785378b8e to your computer and use it in GitHub Desktop.
Example of per process gpu memory limit. This isn't specific to Mask RCNN and is a simple tensorflow config option. Example below will use 20% of your GPU memory per process.
This file contains hidden or 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 | |
tf_config = tf.ConfigProto() | |
tf_config.gpu_options.per_process_gpu_memory_fraction = 0.2 | |
set_session(tf.Session(config=tf_config)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment