![]() The idea is that you train on your training data and tune your model with the results of metrics (accuracy, loss etc) that you get from your validation set. If you want to build a solid model you have to follow that specific protocol of splitting your data into three sets: One for training, one for validation and one for final evaluation, which is the test set. Therefore, it would be okey to use the same validation and test set, right?Ĭould anyone confirm if the validation set in model.fit has any other goal besides being read from the callbacks? The result of this function is used to fill the values of the logs, which are the values accessible from the callbacks.Īfter seeing all this, I feel that the validation set passed to model.fit is not used to validate anything during training, and its only use is to get feedback on how the trained model will perform in every epoch for a completely independent set. also calls ._fit_loop, which adds the validation data to the callbacks.validation_data, and also calls ._test_loop, which will loop the validation data in batches on the self.test_function of the model. I investigated a bit, and I saw that calls, which creates variables like val_accand val_loss (which can be accessed from Callbacks). History = model.fit(X_train, Y_train, validation_data=(X_test, Y_test)) ![]() # Train model (use validation data as validation set) ![]() History = model.fit(X_train, Y_train, validation_split=0.1) # Train model (use 10% of training set as validation set) I am talking about the validation set that can be passed like this: # Create model My question is simple, what is the validation data passed to model.fit in a Sequential model used for?Īnd, does it affect how the model is trained (normally a validation set is used, for example, to choose hyper-parameters in a model, but I think this does not happen here)? ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |