Prevent by allocating the whole gpu memory by tensorflow
How to prevent using whole memory of gpu by tensorflow 1.13?
How to prevent using whole memory of gpu by tensorflow 1.13?
Tensorflow has some confirguarionts for every Session. You can just change the config for the session by using
config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 0.5
tf.Session(config=config)