Deep Learning for Nature Language Processing --- 第四讲(下)
时间:
2015-07-04 22:17:07
阅读:
337
评论:
收藏:
0
[点我收藏+]
A note on matrix implementations
将J对softmax的权重W和每个word vector进行求导:

尽量使用矩阵运算(向量化),不要使用for loop。
模型训练中有两个开销比较大的运算:矩阵乘法f=Wx和指数函数exp

Softmax(=logistic regression) is not very powerful
softmax只是在原来的向量空间中给出了一些linear decision boundary(线性决策线),在小的数据集上有很好的regularization,但是在处理大数据集的时候会受到很大的限制。

但是neural network能够很好地克服softmax的缺点:

From logistic regression to neural nets
不单独介绍神经网络,可以参考其他介绍神经网络的文章
如果没有非线性的激活函数,那么输入x后,第一层就是W1*x,第二层就是W2*W1*x,等同于这个神经网络只有一层,权重为W2*W1。
有更多的层,deep learning就可以有近似(分类)更复杂数据集的功能:

神经网络的单层single layer就是一个线性表达式和一个非线性函数的组合:

激励activation可以用来计算某个函数,例如在softmax中:

示例:计算三层神经网络中一个window’ score(s=score(museumsinParisareamazing)):
score其实就是softmax的概率值
下一讲
训练一个window-based的神经网络
反向传播backpropagation
Deep Learning for Nature Language Processing --- 第四讲(下)
原文:http://blog.csdn.net/meanme/article/details/46757417