当前位置:网站首页>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 .
边栏推荐
猜你喜欢
Avoid material "minefields"! Play with super high conversion rate
Hmi-32- [motion mode] add light panel and basic information column
Multi person online anonymous chat room / private chat room source code / support the creation of multiple chat rooms at the same time
Azkaban actual combat
ELK日志分析系统
Mongodb common commands
Linux安装Redis
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Flume配置4——自定义MYSQLSource
Voice chip wt2003h4 B008 single chip to realize the quick design of intelligent doorbell scheme
随机推荐
数据库和充值都没有了
【微服务|SCG】Filters的33种用法
Pat class a 1160 forever (class B 1104 forever)
Linux安装Redis
Kbp206-asemi rectifier bridge kbp206
Why are there fewer and fewer good products produced by big Internet companies such as Tencent and Alibaba?
[Yu Yue education] National Open University autumn 2018 8109-22t (1) monetary and banking reference questions
Yyds dry goods inventory intelligent fan based on CC2530 design
Kuboard
Master Fur
单项框 复选框
Machine learning experiment report 1 - linear model, decision tree, neural network part
The database and recharge are gone
Single line function*
GFS distributed file system
d3js小记
【LeetCode】106. Construct binary tree from middle order and post order traversal sequence (wrong question 2)
ELK日志分析系统
ASP. Net core 6 framework unveiling example demonstration [01]: initial programming experience
Share the newly released web application development framework based on blazor Technology