当前位置:网站首页>How to learn to get the embedding matrix e # yyds dry goods inventory #
How to learn to get the embedding matrix e # yyds dry goods inventory #
2022-07-05 03:04:00 【LolitaAnn】
This article is my note sharing , The content mainly comes from teacher Wu Enda's in-depth learning course . [1]
We talked about it earlier word embedding. But how can we learn ?
Practice has proved , Building language models is learning word embedding Good way [2].
Now let's build a language model to try how to predict and fill sentences .
Make sentence prediction . Now we have marked each word of this sentence with a serial number .
We have one-hot vector Learn to get word embedding matrix , Re pass word embedding Matrix and one-hot Vector multiplication . Get the corresponding word word embedding vector .
We're going to get embedding Put the vector into the neural network language model . One more pass softmax layer . And then this softmax Layer will find the most reliable answer in your word list as output .
Now analyze the dimensions .
h It is processed by neural network splicing , Is to predict the seventh word of the sentence , Put the first six words of the sentence together and put them into the neural network for processing .
In the process of actual operation , Due to the different degrees of protons , Therefore, not all the contents in front are spliced together every time . Instead, select a size window to predict the sliding .
For example, the setting only considers the front 4 Word . Then it comes to the step of neural network calculation ,H It will become length 1200. instead of 1800.
In this way, the neural network is used to train it . Inspired by the algorithm , Your network will constantly adjust data . Final Orange、Apple、Durian、Strawberry、Watermelon Short words will learn similar eigenvalues .
This is learning to gain word embedding matrix One of the ways .
This shows that the window we use in this example is before selection 4 Word . There are other ways to select context , For example, a few words around the vacancy 、 A few words after the vacancy .
Adapt to a skip-gram The model idea of , Then we will make a detailed introduction .
边栏推荐
- 2021 Li Hongyi machine learning (1): basic concepts
- Apache Web page security optimization
- GFS distributed file system
- [micro service SCG] 33 usages of filters
- 打破信息茧房-我主动获取信息的方法 -#3
- Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
- Simple use of devtools
- The database and recharge are gone
- [2022 repair version] community scanning code into group activity code to drain the complete operation source code / connect the contract free payment interface / promote the normal binding of subordi
- Pdf things
猜你喜欢
单项框 复选框
【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
Jd.com 2: how to prevent oversold in the deduction process of commodity inventory?
SQL performance optimization skills
【LeetCode】111. Minimum depth of binary tree (2 brushes of wrong questions)
2021 Li Hongyi machine learning (2): pytorch
College Students' innovation project management system
Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)
Anchor free series network yolox source code line by line explanation Part 2 (a total of 10, ensure to explain line by line, after reading, you can change the network at will, not just as a participan
Elk log analysis system
随机推荐
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Hmi-32- [motion mode] add light panel and basic information column
GFS distributed file system
[2022 repair version] community scanning code into group activity code to drain the complete operation source code / connect the contract free payment interface / promote the normal binding of subordi
Sqoop command
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Avoid material "minefields"! Play with super high conversion rate
【微服务|SCG】Filters的33种用法
Accuracy problem and solution of BigDecimal
College Students' innovation project management system
Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
Bumblebee: build, deliver, and run ebpf programs smoothly like silk
Talk about the SQL server version of DTM sub transaction barrier function
【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)
Hmi-31- [motion mode] solve the problem of picture display of music module
Day_ 17 IO stream file class
GFS分布式文件系统
qrcode:将文本生成二维码
Devtools的簡單使用
Design of KTV intelligent dimming system based on MCU