Build a validation set with Keras
Why Stack Overflow recommends it
Stack Overflow users link it when answering questions about what a validation set is, how it differs from a test set, and how to pass validation data to Keras fit.
Recommended by 3 people across 4 different months, 2017 to 2022.
What it is
A roughly 10-minute deeplizard episode showing how to build and use a validation set when training a neural network with TensorFlow's Keras API. It is part of a beginner-oriented Keras deep learning series presented by the deeplizard channel.
What people said
Recommends blackHoleDetector · 2017-09 · Stack Overflow · on “What is validation data used for in a Keras Sequential model?”
This YouTube video explains what a validation set is, why it's helpful, and how to implement a validation set in Keras: Create a validation set in Keras [this video] With a validation set, you're essentially taking a fraction of your samples out of your training set, or creating an entirely new set all together, and holding out the samples in this set from training. During each epoch, the model will be trained on samples in the training set but will NOT be trained on samples in the validation set. Instead, the model will only be validating on each sample in the validation set. The purpose of doing this is for you to be able to judge how well your model can generalize. Meaning, how well is your mo
Recommends blackHoleDetector · 2017-11 · Stack Overflow · on “Can testing set be used as validation set”
For a test set to be a true test set, the labels should never be supplied to the model. If you use the test set also as the validation set, then although your model isn't necessarily training on the validation set, it will have seen the labels for this set during training So, in short, you really need three distinct sets of data for training, validation, and test. If you need additional resources, here [LINK] is a video that breaks these sets down into their distinct purposes, and here [this video] is another one for working with validation sets in Keras.
Recommends pilczuk · 2018-05 · Stack Overflow · on “How to calculate confusion matrix for a training model ? (from this code)”
@rzr I recommend you to take a look at some tutorials which might help you - to understand splitting into train/[validation or test] set (and explaining what they are) because I think that you train your model on whole training set and if you want to build confusion matrix on data which was used in training it might give you some misleading results. Here you have nice tutorials about Keras - [this video] or if you want to understand a bit more what happen behind the hood you may take a look at Andrew Ng ML course.
Recommends DPM · 2022-02 · Stack Overflow · on “keras fit does not return loss history for validation set”
The problem was that the input for validation_data was structured incorrectly, you can't pass both a list with x1_val and x2_val and then y_val. Take a look at the documentation here: [LINK] and this video that explains how to create a validation dataset for keras: [this video]
Recommends DPM · 2022-02 · Stack Overflow · on “keras fit does not return loss history for validation set”
In this post: [LINK] they mention a very handy youtube video that explains quite well how to buld a validation dataset for keras: [this video]