当前位置:网站首页>Word2vec yyds dry goods inventory
Word2vec yyds dry goods inventory
2022-07-01 14:34:00 【LolitaAnn】
This article is my note sharing , The content mainly comes from teacher Wu Enda's in-depth learning course . [1]
Word2Vec There are two training modes .
- CBOW(Continuous Bag-of-Words Model)
- Skip-gram (Continuous Skip-gram Model)
This article is about skip-grams [2].
We talked about how to get word embedding Of E A method of matrix . The neural network is used for training . Of course, we need to know that method of training , The computational complexity is very large . So is there a simpler way .
Basic model
stay skip-gram In the model, we should establish a supervised learning model .
Here we need to choose a context vocabulary (Content) And a target vocabulary (Target).
Model process :
one-hot→E→word embedding e→softmax→
- First of all, we should start from the vocabulary one-hot vector Starting with .
- We can get one word embedding matrix .
- take word embedding Matrix and one-hot Multiply the vectors to get word embedding vector .
- In this way, the result is sent to softmax in .
- Get the final result
among softmax The calculation formula of is :
- Yes and output t Related parameters , That is, an output word t What is the probability of matching the label .
- There is no offset .
The loss function uses a natural estimate of the negative logarithm .
softmax Then output a 10000 The vector of the dimension . The result is the probability of all possible target words .
Optimizing this model will be much simpler than that neural network we talked about before .
solve softmax Large amount of computation
Look at softmax Calculation formula , We should know that its denominator calculation is very large . Our example vocabulary only 1 ten thousand . The amount of calculation is terrible . If the scale of those vocabularies is 100 Wan? .
One way is to split it evenly . Consider binary search . He won't tell you at once that the final result is 1 Which position in ten thousand words . It tells you in layers .
For example, the first floor tells you , He's in the back 5000 Among them . The second floor tells you , He's ahead 7500 Among them . Then the third layer will tell you layer by layer .

Another method is to count by frequency .
Consider the kind of Harman tree . The higher level is closer to the root node . Of course, there are also those with relatively low mechanical balance , Closer to the root node .

边栏推荐
- 被裁三個月,面試到處碰壁,心態已經開始崩了
- Research Report on the development trend and competitive strategy of the global diamond suspension industry
- Sorting learning sorting
- Admire, Ali female program undercover more than 500 black production groups
- SWT/ANR问题--如何捕获性能的trace
- Research Report on the development trend and competitive strategy of the global chemical glassware industry
- 2022-2-15 learning xiangniuke project - Section 1 filtering sensitive words
- MySQL日志
- 2022. Let me take you from getting started to mastering jetpack architecture components - lifecycle
- About the use of HTTP cache validation last modified and Etag
猜你喜欢
![[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system](/img/fa/15b1cc3a8a723ff34eb457af9f701e.jpg)
[repair version] imitating the template of I love watching movies website / template of ocean CMS film and television system

【商业终端仿真解决方案】上海道宁为您带来Georgia介绍、试用、教程

In depth cooperation | Taosi data cooperates with changhongjia Huawei customers in China to provide tdengine with powerful enterprise level products and perfect service guarantee

The integration of computing and Internet enables the transformation of the industry, and the mobile cloud lights up a new roadmap for the future of digital intelligence

This paper introduces an implementation scheme to enhance the favorite transaction code management tool in SAP GUI

sqlilabs less9

Use lambda function URL + cloudfront to realize S3 image back to source

How to view the state-owned enterprises have unloaded Microsoft office and switched to Kingsoft WPS?

Opencv interpolation mode

phpcms实现订单直接支付宝支付功能
随机推荐
Pat 1121 damn single (25 points) set
【牛客网刷题系列 之 Verilog快速入门】~ 多功能数据处理器、求两个数的差值、使用generate…for语句简化代码、使用子模块实现三输入数的大小比较
[stage life summary] I gave up the postgraduate entrance examination and participated in the work. I have successfully graduated and just received my graduation certificate yesterday
Research Report on the development trend and competitive strategy of the global high temperature label industry
Use of Oracle database objects
Research Report on the development trend and competitive strategy of the global camera filter bracket industry
【阶段人生总结】放弃考研,参与到工作中,已经顺利毕业了,昨天刚领毕业证
One of the data Lake series | you must love to read the history of minimalist data platforms, from data warehouse, data lake to Lake warehouse
Is it reasonable and safe for securities companies to open accounts for 10000 free securities? How to say
Research Report on the development trend and competitive strategy of the global chemical glassware industry
sqlilabs less-11~12
【14. 区间和(离散化)】
Tdengine connector goes online Google Data Studio app store
Logic is a good thing
从零开发小程序和公众号【第三期】
MySQL日志
那个很努力的学生,高考失败了……别慌!你还有一次逆袭机会!
Build your own website (21)
Provincial election + noi Part IX game theory
Scheme of printing statistical information in log