Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/325.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 让我们回顾一下凯拉斯的历史_Python_Machine Learning_Keras_Deep Learning_Mlp - Fatal编程技术网

Python 让我们回顾一下凯拉斯的历史

Python 让我们回顾一下凯拉斯的历史,python,machine-learning,keras,deep-learning,mlp,Python,Machine Learning,Keras,Deep Learning,Mlp,我正在用 metrics=["accuracy", keras.metrics.Recall()] 如文件中所述。但当我在训练模型后试图获得它时,我得到了一个关键错误“回忆”。两个版本 recall = estimator_bio.history["Recall"] recall = estimator_bio.history["recall"] 导致 KeyError: 'Recall' 当 工作。召回的关键字是什么?您始终可以

我正在用

metrics=["accuracy", keras.metrics.Recall()]
如文件中所述。但当我在训练模型后试图获得它时,我得到了一个关键错误“回忆”。两个版本

recall = estimator_bio.history["Recall"]
recall = estimator_bio.history["recall"]
导致

KeyError: 'Recall'


工作。召回的关键字是什么?

您始终可以向指标传递名称:

metrics=["accuracy", keras.metrics.Recall(name='recall')]
这样你就可以很容易地引用它

无论如何,您应该打印或检查历史对象的内容,以查看它包含的内容以及分配给
调用
(顺便说一下,应该是
调用
)的实际键/名称

通常你要做的是:

# Fit the model
history = model.fit(.....)
# and then you can see what is available in the history with:
print(history.history.keys())
# Fit the model
history = model.fit(.....)
# and then you can see what is available in the history with:
print(history.history.keys())