The loss function serves as an evaluation of the training process, that is, how well the algorithm for generating synthetic data models the original data. The less loss, the more knowledge there is about the original data. To avoid overfitting, an early stop is usually implemented to terminate the training process as soon as the validation loss is no longer decreasing.