Parallel training function

todo: regularizer