I've rewritten the backprop algorithm and it's now working in batch mode