Validation Data -- how it can be used
Briefly from tensorflows own official site --at a highlevel (https://www.tensorflow.org/guide/keras/train_and_evaluate#using_a_validation_dataset):
-
How is Validation Data Used & When : At the end of each epoch, the model will iterate over the validation dataset and compute the validation loss and validation metrics.
IIf you want to run validation only on a specific number of batches from this dataset, you can pass the validation_steps argument, which specifies how many validation steps the model should run with the validation dataset before interrupting validation and moving on to the next epoch:
-
USE to Indicate How Well the Model is Training: It can give you idea of how your model will respond to real test data and is better than using training data loss and accuracy as you train to indicate this as it is not used in training itself. You can also use validation data to help you decide how to decay/change the learning rate:
The learning decay schedule (how you decrease the learning rate) could be static (fixed in advance, as a function of the current epoch or the current batch index), or DYNAMIC (responding to the current behavior of the model, in particular the VALIDATION LOSS) -
USE - indicates when you might stop Training Early: You can do things like
EarlyStopping: Stop training when training is no longer improving the validation metrics.