https://onlinebme.com/early-stopping-in-deep-learning/