当前位置:网站首页>pytorch-softmax回归
pytorch-softmax回归
2022-07-05 11:34:00 【我渊啊我渊啊】
1、softmax回归模型
softmax回归模型和线性回归一样将输入特征和权重做线性叠加,softmax回归的输出个数等于标签里的类别数。例如在一个图片分类的问题中,输入的图像为2x2像素图片,分别记为x1,x2,x3,x4。对应数据集的真实标签为狗,猫,鸡,记为o1,o2,o3。
softmax回归同线性回归一样,也是一个单层神经网络。输出层也是一个全连接层。
2、softmax运算
问题:1.输出层输出的范围不确定。2.很难度量其与真实值之间的误差
解决:softmax运算——将输出值变化成值为正且和为1的概率分布
softmax回归对样本i分类的矢量计算表达式为:
3、交叉熵损失函数(cross entropy)——用于分类模型
4、总结
1、softmax回归适用于多分类问题,它使用softmax运算输出类别的概率分布
2、softmax回归是一个单层神经网络,输出个数等于分类问题的类别个数
3、交叉熵适合衡量两个概率分布的差异
5、为什么pytorch 框架内没有softmax module?
边栏推荐
猜你喜欢
Modulenotfounderror: no module named 'scratch' ultimate solution
AUTOCAD——遮罩命令、如何使用CAD对图纸进行局部放大
How did the situation that NFT trading market mainly uses eth standard for trading come into being?
7.2每日学习4
分类TAB商品流多目标排序模型的演进
Pytorch training process was interrupted
7.2 daily study 4
Redis集群的重定向
COMSOL--三维随便画--扫掠
[office] eight usages of if function in Excel
随机推荐
解决访问国外公共静态资源速度慢的问题
Summary of thread and thread synchronization under window
Web API配置自定义路由
Redis集群(主从)脑裂及解决方案
7 大主题、9 位技术大咖!龙蜥大讲堂7月硬核直播预告抢先看,明天见
Solve readobjectstart: expect {or N, but found n, error found in 1 byte of
【爬虫】wasm遇到的bug
[crawler] Charles unknown error
分类TAB商品流多目标排序模型的演进
I used Kaitian platform to build an urban epidemic prevention policy inquiry system [Kaitian apaas battle]
Acid transaction theory
SSL证书错误怎么办?浏览器常见SSL证书报错解决办法
Sklearn model sorting
The ninth Operation Committee meeting of dragon lizard community was successfully held
Startup process of uboot:
How to protect user privacy without password authentication?
SET XACT_ ABORT ON
IPv6与IPv4的区别 网信办等三部推进IPv6规模部署
13.(地图数据篇)百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换
Redis如何实现多可用区?