Implement Early Stopping Pytorch