Question: Question Four ( 1 0 Marks ) In a sentiment classification, we use the attention mechanism to compute the encoding for the input sequence I
Question Four Marks
In a sentiment classification, we use the attention mechanism to compute the encoding for the input sequence "I like the pattern class". Assume the initial embedding transposed will be like the pattern class
We will use single head attention with
Wq the concatenation of the embedding of I, pattern, pattern, class
Wv the concatenation of the embedding of I, the, pattern, class
Wk the identity matrix.
Find the embedding for the token "like" using selfattention. Show steps
Use hardcoded sinusoid functions to compute the positional embedding for the word "like". Then add the positional embedding to the embedding you obtained in part
Suppose we have another token "hate" with initial embedding Given the same context of the token "like" how efficiently can you repeat part
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
