6

validation_data can be passed to model.fit, but how does this parameter affect training, and how to confirm optimized parameters of validation_data? I know validation dataset is used for models to tune optimal parameters. But I cannot imagine the difference between with and without validation_data.

Is e.g. the learning rate of back-propagation is automatically optimized by the validation dataset?

I have read the following What is the difference between test set and validation set?

Validation set: a set of examples used to tune the parameters of a classifier. In the MLP case, we would use the validation set to find the "optimal" number of hidden units or determine a stopping point for the back-propagation algorithm

nbro
  • 15,395
  • 32
  • 113
  • 196
jef
  • 3,890
  • 10
  • 42
  • 76

1 Answers1

6

Is e.g. the learning rate of back-propagation is automatically optimized by the validation dataset?

No, it is not.

Your model fits the weights of the learned function to your training data using your pre set hyperparameters. That function is validated on your validation set. Based on the performance of your function on the validation set you can set the hyperparameters to good values, either per hand or by using heuristics.

nbro
  • 15,395
  • 32
  • 113
  • 196
Thomas Pinetz
  • 6,948
  • 2
  • 27
  • 46
  • Thank you. Then, when is validation set validated? I cannot find any validation result during `fit`. – jef Oct 12 '17 at 17:08
  • Normally after every epoch. If you use verbose setting keras outputs the validation score too – Thomas Pinetz Oct 12 '17 at 18:51
  • 3
    I'll check it later. Then, validation data is just eveluated every epoch. This is exactly same evaluation function as 'evaluate()' on test dataset? – jef Oct 13 '17 at 02:49