当前位置:网站首页>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 .
边栏推荐
- [200 opencv routines] 99 Modified alpha mean filter
- Single line function*
- Asemi rectifier bridge 2w10 parameters, 2w10 specifications, 2w10 characteristics
- 腾讯云,实现图片上传
- Good documentation
- When the low alcohol race track enters the reshuffle period, how can the new brand break the three major problems?
- Privatization lightweight continuous integration deployment scheme -- 01 environment configuration (Part 1)
- Tencent cloud, realize image upload
- GFS分布式文件系统
- Spoon inserts and updates the Oracle database, and some prompts are inserted with errors. Assertion botch: negative time
猜你喜欢

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

Yuan universe also "real estate"? Multiple second-hand trading websites block metauniverse keywords

Linux Installation redis

Design and implementation of kindergarten management system

Zabbix

【LeetCode】404. Sum of left leaves (2 brushes of wrong questions)

Azkaban安装部署

VM in-depth learning (XXV) -class file overview

Azkaban overview

Linux安装Redis
随机推荐
Daily question 2 12
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
端口,域名,协议。
Acwing第 58 场周赛【完结】
How to make OS X read bash_ Profile instead of Profile file - how to make OS X to read bash_ profile not . profile file
How can we truncate the float64 type to a specific precision- How can we truncate float64 type to a particular precision?
Elk log analysis system
Design of kindergarten real-time monitoring and control system
LeetCode 234. Palindrome linked list
Character painting, I use characters to draw a Bing Dwen Dwen
Apache build web host
Avoid material "minefields"! Play with super high conversion rate
Pytest (4) - test case execution sequence
qrcode:将文本生成二维码
El select, El option drop-down selection box
Qrcode: generate QR code from text
Sqoop命令
Last words record
Returns the lowest common ancestor of two nodes in a binary tree
Mongodb common commands