专业英语chapter3
本章概览
the cross-entropy cost function(交叉熵损失函数).Four so called regulariation methods (四个正则化项方法)
Cross-entropy
It will pick the initial weight to be (some value)and the initial bias to be (some value) .
These are generic choices used as a place to
begin learning.
也就是说这些初始化方法是随机选取的。
It wasn t picking them to be special in any way.
This behaviour is strange when contrasted to human learning.
在人类学习过程中,对于错误比较大的地方往往会学的比较快,错误小的地方会学的比较慢。
可是在神经元学习过程中,对于错误比较大的地方往往会学的比较慢。
It was said at the beginning of this section, we often learn fastest when we are badly wrong about something.
But we ve just seen that our artificial neuron has a lot of difficulty learning when it s badly wrong - far more difficulty than when it s just a little wrong.
解决slow learning 方法的目标
The larger the error, the faster the neuron will learn.
What is the learning slowdown problem?
What general idea can we learn from cross-entropy and softmax to solve the learning slowdown problem?
1.学的慢/对于出错很大的case并没有很好的学习,
开始学习速度慢。
梯度偏导数很小
Slowdown problem:learning rate变化很小,学习的效果慢。
为什么交叉熵损失函数可以作为代价函数?
可以作为代价函数的原因:
The cross-entropy is positive, and tends toward zero as the neuron gets better at computing the desired output, for all training inputs,
当模型距离我们先要的真实值越近的时候,我们的函数离0也越近,就可以是一个损失函数模型。
非负性(看到的时候没抓住这个重点)。
交叉熵损失函数的偏导形式告诉我们什么呢?错误越大,印象越深,学的越快。general idea to solve slowdown problem.
神经元的输出就是 a = σ(z),Sigmoid Function是神经元的输出。
Epoch-Cost 图像上的上凸和下凹
当sigmoid funtion作为输出的时候,交叉熵损失函数来表达Loss function是个很好的选择。
在对单个神经元讨论中,我们指出如果对所有的训练数据有 σ(z) ≈ y,交叉熵会很⼩。这个论断其实是和 y 只是等于 1 或者 0 有关。这在分类问题⼀般是可⾏的,但是对其他的问题(如回归问题)y 可以取 0 和 1 之间的中间值的。
证明,交叉熵对所有训练输⼊在σ(z) = y 时仍然是最⼩化的。此神经元的饱和问题。
学习速度下降是$\sigma’(z)$的问题。
二次代价损失函数学的慢的原因
Greater initial error 对学习率的影响。
Roughly speaking, the idea is that the cross-entropy is a measure of surprise.(即熵是对不确定性的度量。)
相对熵又称KL散度,用于衡量对于同一个随机变量x的两个分布p(x)和q(x)之间的差异。
回归问题的值与分类问题的(0,1)。
Softmax
同样解决交叉熵损失函数的方法还有softmax方法。
softmax和sigmoid思想类似,都是改变输出层的输出方式:out put layer.
we see that the output from the softmax layer is a set of positive numbers which sum up to 1.
In other words, the output from the softma[ layer can be thought of as a probability distribution.
你可以将其想象成⼀种重新调节 某些参数 的⽅法,然后将这个结果整合起来构成⼀个概率分布。
也就是说调节参数让和变成1.
对数似然损失函数。
GD方法的实质是偏导数的改变,偏导数的改变影响训练的走的方向,所以改变slowdown问题实质还是改变偏导数的问题。
In fact, it s useful to think of a Softmax output layer with log-likelihood cost as being quite similar to a sigmoid output layer with cross-entropy cost.
Softmax输出+对数似然损失函数 与 sigmoid输出+交叉熵损失函数。
在已知这种相似性的情况下又该做何选择呢?
In many cases: both work well.softmax plus log-likelihood is worth using whenever you want to interpret the output activations as probabilities.
multi-Classification : independent的情况适配的很好。
softmax用于多分类过程中,它将多个神经元的输出,映射到(0,1)区间内,可以看成概率来理解,从而来进行多分类.
softmax为什么有soft?
看到了一个很形象的回答,当我把本来的max函数映射到概率以后,变成了不是数值大的一定会取到,而是数值大的有较大概率也会取到,这样就比较好的理解了soft.