I get the error saying “value” argument is missing.
I just am not able to figure out, what else I need to send to self.mha(…)
I can see the hints that ask me to send query, key, value and mask. But where do I get them from. I can see that the init gets (embedding_dim, num_heads, fully_connected_dim) and the call function gets (x, training, mask) as arguments. Thats it. Where do we get the query, key and value matrices from?
Edit: After going through following I was able to solve it.
@TMosh
Can you please give some clue or link any documentation as to why q, k and v are the same to self.mha()?
I dont understand why q, k and v matrices are same.
In the video lecture the professor tells that q is like a question, k is like a key and v is the value for a particular word. Now how can all these three be the same??
At item 1), you can see that the self-attention MHA uses X for Q, K, and V.
At item 2), you can see that K and V come from the Encoder, and Q comes from another self-MHA layer.
Ahh I see.
Yes, from 1) we can see that mha uses X for Q, K and V.
a) But what is the intuition or reasoning behind this?
b) Is it like Q, K, V will be built during training phase?
c) Do we have back-propagation here or not during training?
(I think backpropagation should be there, but not quite sure where it fits in)
Do you know of any blogs or resources to help understand this?