title: How to tell if my neural network is crashing due to memory errors?
body: <p>I am trying to calibrate my expectations around a single laptop's ability to train a neural network.  I am using tensorflow and keras and after about say 10 minutes, it crashes. I've seen <code>killsignal 9 exit code 137</code>, and I'm wondering if this is due to insufficient memory? Other times, when one-hot encoding using <code>np_utils.to_categorical()</code> I've seen the words <code>memoryerror</code> in the console, and that's it and my script crashes.  This is just trying to transform the outputs into what a neural net expects before it even runs.
  I have 6400 inputs and 1500 outputs and a small hidden layer of 100 nodes. Batch size 128. 
  That's it.  It's not even deep.  It crashes whether using an nvidia gpu or a 4 core cpu.  For you pros, is my network too big to train on my system (i7 4 cores, 16gb ram, nvidia GT 750m , compute capability 3.0).  Is my neural network considered a large one? I have 3 million samples, btw.</p>
  
  <p>1) How do I estimate the amount of memory required for my network?  Is it <code>6400 (# inputs) * 1500 (#outputs) * 4 bytes (per parameter) = 38.4 gb</code>? Can I see how much memory is being used in real time on a mac somewhere?  I've used activity monitor and the memory pressure gauge is normal.
  2) GPUs typically are maxing out at 8gb-12gb of RAM, whereas CPUs on desktops could easily have 64 gb.  So if the memory requirements of my network exceed 8gb of RAM, would it be impossible to train on a single GPU?
  3) what is the difference, especially memory wise, between batch_size and batch_training?
  Thank you!</p>