Algorithmic techniques for neural network training on memory-constrained hardware