I'm using Keras on Python to train a CNN autoencoder. In the fit()
method I have to provide validation_split
or validation_data
. First, I would like to use 80% of my data as training data and 20% as validation data (random split). As soon as I have found the best parameters, I would like to train the autoencoder on all the data, i.e. no more using a validation set.
Is it possible to train a Keras model without using a validation set, i.e. using all data to train?
Moreover, the pixels in my images are all in the range [0, -0.04]. Is it still recommended to normalize the values of all pixels in all images in the training and validation set to the range [0,1] or to [-1,1] or to standardize it (zero mean, unit variance)? If so, which method is prefered? By the way, my images are actually 2D heat maps (one color channel).
Yes, you can train a keras model without validation data, but its not a good practice, because then you would not know if the model can generalize or not. The same applies for autoencoders, they can overfit to the training set.
It is always recommended to normalize your inputs, specially if the ranges are large or small. There is no preferred method, any normalization generally works the same.