当前位置:网站首页>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 .
边栏推荐
- Returns the lowest common ancestor of two nodes in a binary tree
- 【微服务|SCG】Filters的33种用法
- ELK日志分析系统
- 2.常见的请求方法
- Hmi-31- [motion mode] solve the problem of picture display of music module
- Avoid material "minefields"! Play with super high conversion rate
- Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
- Six stone programming: advantages of automated testing
- Hmi-30- [motion mode] the module on the right side of the instrument starts to write
- Vb+access hotel service management system
猜你喜欢
Cut! 39 year old Ali P9, saved 150million
Devtools的簡單使用
Hmi-30- [motion mode] the module on the right side of the instrument starts to write
Port, domain name, protocol.
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Ubantu disk expansion (VMware)
Scientific research: are women better than men?
Acwing第 58 场周赛【完结】
Devtools的简单使用
Apache build web host
随机推荐
Eight days of learning C language - while loop (embedded) (single chip microcomputer)
2. Common request methods
Flume配置4——自定义MYSQLSource
Ask, does this ADB MySQL support sqlserver?
College Students' innovation project management system
Design of kindergarten real-time monitoring and control system
LeetCode 234. Palindrome linked list
1.五层网络模型
Sqoop安装
Anchor free series network yolox source code line by line explanation four (a total of ten, ensure line by line explanation, after reading, you can change the network at will, not just as a participan
Ubantu disk expansion (VMware)
Pytest (5) - assertion
Hmi-30- [motion mode] the module on the right side of the instrument starts to write
【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
FBO and RBO disappeared in webgpu
PHP cli getting input from user and then dumping into variable possible?
TCP security of network security foundation
【LeetCode】222. The number of nodes of a complete binary tree (2 mistakes)
平台入驻与独立部署优缺点对比
Talk about the SQL server version of DTM sub transaction barrier function