【DeepLearning】二分类、多分类与PyTorch

二分类激活函数
Sigmoid
二分类loss函数
BCELoss

多分类激活函数
Softmax
LogSoftmax
多分类loss函数
NLLLoss
BCELoss

LogSoftmax 等价于 torch.log 加 Softmax,但 LogSoftmax 的实现计算更快
BCELoss 等价于 LogSoftmaxNLLLoss

https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py
https://www.cnblogs.com/marsggbo/p/10401215.html
https://www.cnblogs.com/ranjiewen/p/10059490.html
https://blog.csdn.net/hao5335156/article/details/80607732
https://blog.csdn.net/lyy14011305/article/details/88664518
https://blog.csdn.net/u011734144/article/details/79717470

—————————————————————————————————————————————————————
在二分类问题情景下,sigmoid 和 softmax 效果等价:
https://www.aiuai.cn/aifarm679.html
https://gist.github.com/ypwhs/6905ebbda99d04621f9fc00417657ae2

发布了68 篇原创文章 · 获赞 27 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/RadiantJeral/article/details/98035752