Keeping Deep Learning Models in Check: A History-Based Approach to Mitigate Overfitting