里面的validation_split:
validation_split: Float between 0 and 1. Fraction of the training data to be used as validation data. The model will set apart this fraction of the training data, will not train on it, and will evaluate the loss and any model metrics on this data at the end of each epoch. The validation data is selected from the last samples in the x
and y
data provided, before shuffling. This argument is not supported when x
is a generator or Sequence
instance.
注意:这里的validation_split,假设validation_split=0.1,其实是将输入的training data中的最后面的10%的样本拿过来用作validation,然后再做Shuffle (if shuffle=True)。