I implement a neural net in keras
, with the following structure:
model = Sequential([... layers ...])
model.compile(optimizer=..., loss=...)
hist=mo
Keras splits the dataset at
split_at = int(x[0].shape * (1-validation_split))
into the train and validation part. So if you have n
samples, the first int(n*(1-validation_split))
samples will be the training sample, the remainder is the validation set.
If you want to have more control, you can split the dataset yourself and pass the validation dataset with the parameter validation_data
:
model.fit(train_x, train_y, …, validation_data=(validation_x, validation_y))