So for example, let’s say embed1 is the embedding vector of idx1 = 5 and embeds1_context is the weighted sum of the embedding vectors of context_idxs1 = [2,4,6,8].
What I want to do is that by computing the loss, loss1 = torch.sum((embeds1 - embeds1_context)**2), I want to update not only the 5th index of self.embed1, but also the 2,4,6,8th indices of self.embed1.
Will I achieve this by the above code?
I think my previous questions were a little bit unclear.