Neural network training pipeline and architecture