当前位置:网站首页>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 .
边栏推荐
- GFS distributed file system
- Apache Web page security optimization
- Mongodb common commands
- Day_ 17 IO stream file class
- Idea inheritance relationship
- LeetCode --- 1071. Great common divisor of strings problem solving Report
- The database and recharge are gone
- 问下,这个ADB mysql支持sqlserver吗?
- Une question est de savoir si Flink SQL CDC peut définir le parallélisme. Si le parallélisme est supérieur à 1, il y aura un problème d'ordre?
- El select, El option drop-down selection box
猜你喜欢
Sqoop安装
【LeetCode】111. Minimum depth of binary tree (2 brushes of wrong questions)
Sqoop command
Zabbix
Zabbix
腾讯云,实现图片上传
Problem solving: attributeerror: 'nonetype' object has no attribute 'append‘
ELK日志分析系统
[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
Pat class a 1162 postfix expression
随机推荐
【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)
el-select,el-option下拉选择框
Talk about the SQL server version of DTM sub transaction barrier function
Acwing game 58 [End]
Design of KTV intelligent dimming system based on MCU
Dart series: collection of best practices
Qrcode: generate QR code from text
The latest blind box mall, which has been repaired very popular these days, has complete open source operation source code
Sqoop installation
Breaking the information cocoon - my method of actively obtaining information - 3
Moco V2 literature research [self supervised learning]
TCP security of network security foundation
ELFK部署
Three line by line explanations of the source code of anchor free series network yolox (a total of ten articles, which are guaranteed to be explained line by line. After reading it, you can change the
[105] Baidu brain map - Online mind mapping tool
Single box check box
【LeetCode】111. Minimum depth of binary tree (2 brushes of wrong questions)
Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
【LeetCode】106. Construct binary tree from middle order and post order traversal sequence (wrong question 2)
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety