当前位置:网站首页>Tensorflow2.0 confusion matrix does not match printing accuracy
Tensorflow2.0 confusion matrix does not match printing accuracy
2022-07-30 19:02:00 【Heke】
Recently working on a binary classification project, the last few layers of the model are like this, and finally activated with sigmiod.
model.add(tf.keras.layers.Dense(64, activation='relu'))model.add(tf.keras.layers.Dropout(0.5)),model.add(tf.keras.layers.Dense(1, activation='sigmoid'))The loss function uses this
tf.keras.losses.binary_crossentropyJust run it
model.fit(...)The effect of the printed information is not bad. Finally, I took a look at the confusion matrix again, and I vomited.In this way, it is OK to use y_pred.
pred = self.model.predict(x)y_pred = (pred>0.5).astype(int)边栏推荐
- SwiftUI iOS Boutique Open Source Project Complete Baked Food Recipe App based on SQLite (tutorial including source code)
- 【科普】无线电波怎样传送信息?
- 【Swords Offer】Swords Offer 17. Print n digits from 1 to the largest
- 《痞子衡嵌入式半月刊》 第 59 期
- Scrapy framework is introduced
- Node encapsulates a console progress bar plugin
- 怎么样的框架对于开发者是友好的?
- 终端分屏工具Terminalx的使用
- [Use of Qt Designer tool]
- Spark学习:编译Spark项目时遇到的报错
猜你喜欢

golang日志库zerolog使用记录

【PHPWord】Quick Start of PHPWord in PHPOffice Suite

MongoDB打破了原则引入SQL?

AI基础:图解Transformer

谷歌AlphaFold近日宣称预测出地球上几乎所有蛋白质结构

SimpleOSS第三方库libcurl与引擎libcurl错误解决方法

中集世联达工业级成熟航运港口人工智能AI产品规模化应用,打造新一代高效能智慧港口和创新数字港口,全球港航人工智能能领军者中集飞瞳

Mysql execution principle analysis

Codeblocks + Widgets 创建窗口代码分析

Mysql执行原理剖析
随机推荐
C# wpf borderless window add shadow effect
跨域问题的解决方法
2种手绘风格效果比较,你更喜欢哪一种呢?
Two-point answer naked question (plus a little pigeonhole principle)
Object和Map的区别
微信小程序云开发 | 城市信息管理
深化校企合作 搭建技术技能人才成长“立交桥”
Immersive experience iFLYTEK 2022 Consumer Expo "Official Designated Product"
VBA批量将Excel数据导入Access数据库
Critical Reviews | 南农邹建文组综述全球农田土壤抗生素与耐药基因分布
C# wpf 无边框窗口添加阴影效果
【Qt Designer工具的使用】
不同的路径依赖
终端分屏工具Terminalx的使用
阿里云武林头条活动分享
还有三天忙完
AI Basics: Graphical Transformer
- daily a LeetCode 】 【 191. A number of 1
浅聊对比学习(Contrastive Learning)第一弹
架构师如何成长