Fix bug: when num_epochs() is zero