python - 如何通过编译获得 Fscore
问题描述
要使用 model.compile 获得 Precision 和 Recall,我们可以这样做:
import tensorflow as tf
model.compile( ..., metrics=['accuracy', 'Precision', 'Recall'])
那么如何添加 F1score 来获取所有指标(4)?
解决方案
tfa.metrics.F1Score()
从tensorflow_addons
包中添加。
推荐阅读
- php - 如何为 wordpress 制作 OG 图片
- mysql - 多个或查询中的顺序会影响相关性吗?
- haskell - 在构建中包含美味快速检查的问题
- reactjs - 垂直对齐 div 元素
- delphi - Delphi 10.3 中带有预览的文件打开对话框
- spring-boot - 添加执行器的依赖项后,Spring Boot 无法正常工作
- docker - 为 centos 8 容器设置 php-fpm
- flutter - 在 POST 请求后更新显示的数据
- email - smtp 错误:535 5.7.8 Go 中的 gmail 不接受用户名和密码
- java - 在 Java 中使用 ProcessBuilder 读取输出 git-bash