November 2018
Intermediate to advanced
322 pages
7h 54m
English
At the start of the TensorFlow session, by default, a session grabs all of the GPU memory, even if the operations and variables are placed only on one GPU in a multi-GPU system. If another session starts execution at the same time, it will receive an out-of-memory error. This can be solved in multiple ways:
os.environ['CUDA_VISIBLE_DEVICES']='0'
The code that's executed after this setting will be able to grab all of the memory of the visible GPU.
config.gpu_options.per_process_gpu_memory_fraction ...
Read now
Unlock full access