What validation data is used in the Keras sequential model?

My question is simple, what validation data is passed to model.fit in the serial model used for ?

And does this affect how the model is trained (usually a validation set is used, for example, to select hyperparameters in the model, but I think this does not happen here)?

I am talking about a test suite that can be conveyed as follows:

# Create model
model = Sequential()
# Add layers
model.add(...)

# Train model (use 10% of training set as validation set)
history = model.fit(X_train, Y_train, validation_split=0.1)

# Train model (use validation data as validation set)
history = model.fit(X_train, Y_train, validation_data=(X_test, Y_test))

I did a little research, and I saw what keras.models.Sequential.fitcalls keras.models.training.fit, which creates type variables val_accand val_loss(which can be accessed from Callbacks). keras.models.training.fitalso calls keras.models.training._fit_loop, which adds validation data to callbacks.validation_data, and also calls keras.models.training._test_loop, which will loop the validation data into packets in the self.test_functionmodel. The result of this function is used to populate log values ​​that are values ​​available from callbacks.

, , model.fit - , , , . , okey , ?

- , , model.fit, - ?

+20
2

, : , , .

, (, ..), .

"" , , , . , . , .

, , - , .

, , .

+25

YouTube , , Keras. Keras

, , , .

, . .

, , . , , .

, . , acc loss val_acc val_loss val_loss . , acc , val_acc , , .

+8

Source: https://habr.com/ru/post/1685985/


All Articles