Getting "error invalid argument 4: out of range" on backprop

You can try gdb-ing through it. Here’s a quick guide.