![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
NLP自然语言处理
NLP自然语言处理
morein2008
这个作者很懒,什么都没留下…
展开
-
【转】Transformer实现Pytorch版
https://blog.floydhub.com/the-transformer-in-pytorch/ 哈佛版本:http://nlp.seas.harvard.edu/2018/04/03/attention.html https://pytorch.org/docs/1.3.0/_modules/torch/nn/modules/transformer.html原创 2020-07-10 17:08:00 · 389 阅读 · 0 评论 -
word2vec层次化softmax理解
在外网发现一篇把word2vec的hierarchical softmax优化讲得比较好的博客,详见:http://building-babylon.net/2017/08/01/hierarchical-softmax/ 总结: 1、层次化softmax是为了解决用softmax进行V分类时(V是词典大小),由于词典巨大导致计算目标词的似然概率的低效问题。 2、层次化softmax通常和CBO...原创 2021-03-09 16:30:00 · 641 阅读 · 0 评论 -
基于LDA主题模型和SVM的文本分类
用LDA模型抽取文本特征,再用线性SVM分类,发现效果很差,F1=0.654。 Precision:0.680,Recall:0.649,F1:0.654 RandomForestClassifier的表现也比较差: Precision:0.680,Recall:0.668,F1:0.670 而随便用一个深度学习模型(textCNN,LSTM+Attention)都能达到0.95+的F1,而且还...原创 2020-12-04 20:20:00 · 996 阅读 · 2 评论 -
【记录】Skipgram和CBow实现
numpy、tensorflow手写SkipGram(没有negative sampling)和cbow: http://www.claudiobellei.com/2018/01/07/backprop-word2vec-python/ 这两种实现都需要动手算梯度,手动实现梯度下降,且不没有使用negative sampling。 Pytorch版实现 不用Negative Sampl...原创 2020-07-10 18:01:00 · 212 阅读 · 0 评论