英文:
Which metrics are printed (train or validation) when validation_split and validation_data is not specified in the keras model.fit function?
问题
以下是翻译好的部分:
我有一个TF神经网络,我正在使用tf.data
API来创建数据集,使用生成器。我没有将validation_split
和validation_data
传递到keras的model.fit()
函数中。
上述参数的默认值分别为0.0
和None
。因此,我不确定在model.fit()
之后打印的指标(精度、召回率等)是训练指标还是验证指标?根据我的理解,这些不应该是验证指标,因为我正在使用所提及参数的默认值。
这是我所指的 -
Epoch 1/50 10/10 [==============================] - 6119s 608s/step - loss: 0.6588 - accuracy: 5.4746e-06 - precision: 0.0095 - recall: 0.3080
Tensorflow文档关于model.fit()
英文:
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()
答案1
得分: 1
这些不是验证指标。如果这些是验证指标,那么它们应该以 'val_' 前缀开头,就像这样 - val_loss:, val_accuracy:, val_precision:, val_recall:
。
Epoch 1/50 10/10 [==============================] - 6119秒 608秒/步
- 损失: 0.6588 - 精确度: 5.4746e-06 - 精确率: 0.0095 - 召回率: 0.3080
您代码中上述的指标是在模型编译中定义的,它根据模型编译中定义的参数在模型训练时给出结果。请查看附加链接以获取更多详细信息。
英文:
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
<br> - 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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论