Why, when passing the validation_split parameter to the fit method, the history.history dictionary contains val_loss. And, when passing the validation_data parameter to the fit method, the history.history dictionary does not contain the key val_loss?
(1)
model.compile(
optimizer=keras.optimizers.Adam(learning_rate=1e-3),
loss='mse')
history = model.fit(
x=[x1_train, x2_train], # i have two inputs
y=y_train,
# ...
validation_split=0.2)
history.history.keys() # --> dict_keys(['loss', 'val_loss'])
(2)
model.compile(
optimizer=keras.optimizers.Adam(learning_rate=1e-3),
loss='mse')
history = model.fit(
x=[x1_train, x2_train],
y=y_train,
# ...
validation_data=([x1_val, x2_val], y_val))
history.history.keys() # --> dict_keys(['loss'])