Memory Limitation

Hi all, I’m using ubuntu to learn deep learning and i found it will freeze when the memory is about 95% used.
Is there a goods tool to limit the process memory usage or create virtual memory for the process.
Any idea?

Thanks ahead.

I’ve moved this to the https://community.ubuntu.com/c/support-help-requests category because this site isn’t designed to take tech support questions. Sorry. I’d recommend using one of the official support channels listed on the https://community.ubuntu.com/t/finding-help/712 page