When I started to train some neural network, it met the CUDA_ERROR_OUT_OF_MEMORY
but the training could go on without error. Because I wanted to use gpu memory
Tensorflow 2.0 alpha
The problem is, that Tensorflow is greedy in allocating all available VRAM. That causes issues for some people.
For Tensorflow 2.0 alpha / nightly use this:
import tensorflow as tf
tf.config.gpu.set_per_process_memory_fraction(0.4)
Source: https://www.tensorflow.org/alpha/guide/using_gpu