So there will be better ways to monitor this, but my very simple recipe for getting a first impression:

Start the training,
Every now and then I run the program “top”  in a console window and after hitting “m” it will sort processes by memory use. The column RSS is the one I look at.
If it keeps increasing between the 5th and 10th epoch (or so) and continues to increase between 10th and 20th, you might have something that keeps using memory and never returns it (i.e. a memory “leak”).

Best regards
Thomas