learnToCode
learnToCode

Reputation: 393

Which metrics are printed (train or validation) when validation_split and validation_data is not specified in the keras model.fit function?

I have a TF neural network and I am using the tf.data API to create the dataset using a generator. I am not passing validation_split and validation_data into the model.fit() function of keras.

The default values for the above parameter are 0.0 and None respectively. So, I am not sure about the metrics (precision, recall, etc) that get printed after model.fit(), are those training metrics or validation metrics? According to my understanding, those shouldn't be validation metrics as I am using the default values for the mentioned arguments.

Here's what I am referring to -

Epoch 1/50 10/10 [==============================] - 6119s 608s/step - loss: 0.6588 - accuracy: 5.4746e-06 - precision: 0.0095 - recall: 0.3080

Tensorflow doc for model.fit()

Upvotes: 1

Views: 206

Answers (1)

user11530462
user11530462

Reputation:

These are not validation metrics. If these were validation metrics then these would have

prefix with 'val_' like - val_loss:, val_accuracy:, val_precision:, val_recall:.

Epoch 1/50 10/10 [==============================] - 6119s 608s/step
- loss: 0.6588 - accuracy: 5.4746e-06 - precision: 0.0095 - recall: 0.3080

The above metrics of your code are defined in the model compilation which gives results at model training based on the defined arguments in model compilation. Please check the attached links for more details.

Upvotes: 1

Related Questions