Resolve GPU Memory Issues - MATLAB & Simulink (original) (raw)

Main Content

Training deep neural networks often requires significant memory resources. For best performance, take full advantage of your available GPU memory.

Out of GPU Memory Errors

Running out of GPU memory is a common issue when you train a network. When you run out of GPU memory, the software throws an error:

GPU out of memory. Try reducing 'MiniBatchSize' using the trainingOptions function.

Possible Solutions

If you run out of GPU memory during training, try these solutions and workarounds:

For more information about how to deal with out of memory errors, not specific to GPU memory, see Resolve “Out of Memory” Errors.

See Also

trainingOptions | gpuDevice (Parallel Computing Toolbox)

Topics