train until convergence with max epochs