softmax

1、面对多分类问题,比如:
s = Wx 输出四个整数,经过softmax处理变成4个概率(四个整数分值大的,被取到的概率大些)
概率表示输出这一类的可能性,这些概率相加等于一
面对softmax数值溢出问题,将V中的每个元素减去V中的最大值

scores = np.array([123, 456, 789]) # example with 3 classes and each having large scores
scores -= np.max(scores) # scores becomes [-666, -333, 0]
p = np.exp(scores) / np.sum(np.exp(scores))

2、Softmax损失函数计算相对概率==交叉熵损失(Cross Entropy Loss)
SVM与Softmax的区别就是损失函数不同,更关注正确样本与错误样本之间的距离

3、Softmax的值就是e的元素次方/e所有元素次方的和(元素即为s=wx的输出)
参考文章:
https://blog.csdn.net/red_stone1/article/details/80687921
https://blog.csdn.net/bitcarmanlee/article/details/82320853

你可能感兴趣的:(深度学习)