当前位置:网站首页>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 .
边栏推荐
- Accuracy problem and solution of BigDecimal
- Breaking the information cocoon - my method of actively obtaining information - 3
- Bumblebee: build, deliver, and run ebpf programs smoothly like silk
- 【LeetCode】110. Balanced binary tree (2 brushes of wrong questions)
- 【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
- Returns the lowest common ancestor of two nodes in a binary tree
- Design of KTV intelligent dimming system based on MCU
- Elk log analysis system
- 返回二叉树中两个节点的最低公共祖先
- 2021 Li Hongyi machine learning (2): pytorch
猜你喜欢

The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety

1.五层网络模型

Linux Installation redis

Design and practice of kubernetes cluster and application monitoring scheme

C file in keil cannot be compiled

Pat class a 1162 postfix expression

Cut! 39 year old Ali P9, saved 150million

2021 Li Hongyi machine learning (2): pytorch

Ubantu disk expansion (VMware)

Pat class a 1160 forever (class B 1104 forever)
随机推荐
数据库和充值都没有了
Hmi-30- [motion mode] the module on the right side of the instrument starts to write
Watch the online press conference of tdengine community heroes and listen to TD hero talk about the legend of developers
LeetCode 234. Palindrome linked list
Clean up PHP session files
el-select,el-option下拉选择框
Breaking the information cocoon - my method of actively obtaining information - 3
Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
Hmi-31- [motion mode] solve the problem of picture display of music module
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Single line function*
Yyds dry goods inventory intelligent fan based on CC2530 design
College Students' innovation project management system
Azkaban安装部署
Kbp206-asemi rectifier bridge kbp206
Avoid material "minefields"! Play with super high conversion rate
Azkaban actual combat
Hmi-32- [motion mode] add light panel and basic information column
Linux Installation redis
The database and recharge are gone