Early Stopping in PyTorch to Prevent Overfitting (3.4)