Why we use validation set (not train or test set) in early stopping function ( DL / CNN )?

Viewed 21

This is my first attempt to CNN in Pytorch. I have gone by few tutorials, but still need some clarification.

I have theoretical question, I don't understand why in early stopping function we base on validation set, not train or test set?

Has it something common with metrics we got from validation set?

1 Answers

The number of training epochs is one of the training hyper-parameters. Therefore, you MUST NOT use the test data to determine the value of this hyper-parameter. Additionally, you cannot use the training set itself to determine the value of early stopping. Therefore, you need to use the validation set for determining this value.

Related