摘要: 在上一篇中我们讲到了基于Hierarchical Softmax的word2vec模型,本文我们我们再来看看另一种求解word2vec模型的方法:Negative Sampling。 1. Hierarchical Softmax的缺点与改进 在讲基于Negative Sampling的word2v 阅读全文
posted @ 2018-12-19 17:07 nxf_rabbit75 阅读(546) 评论(0) 推荐(0)
摘要: 1. 基于Hierarchical Softmax的模型概述 我们先回顾下传统的神经网络词向量语言模型,里面一般有三层,输入层(词向量),隐藏层和输出层(softmax层)。里面最大的问题在于从隐藏层到输出的softmax层的计算量很大,因为要计算所有词的softmax概率,再去找概率最大的值。这个 阅读全文
posted @ 2018-12-19 15:03 nxf_rabbit75 阅读(712) 评论(0) 推荐(0)
摘要: word2vec作为神经概率语言模型的输入,其本身其实是神经概率模型的副产品,是为了通过神经网络学习某个语言模型而产生的中间结果。具体来说,“某个语言模型”指的是“CBOW”和“Skip-gram”。具体学习过程会用到两个降低复杂度的近似方法——Hierarchical Softmax或Negati 阅读全文
posted @ 2018-12-19 14:07 nxf_rabbit75 阅读(618) 评论(0) 推荐(0)
摘要: . │ activations.py │ callbacks.py │ constraints.py │ initializations.py │ metrics.py │ models.py │ objectives.py │ optimizers.py │ regularizers.py │ __init__.py │ ├─applications | # ... 阅读全文
posted @ 2018-12-19 10:28 nxf_rabbit75 阅读(602) 评论(0) 推荐(0)