Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started