Once the weights are known, the context vector is the weighted average of the encoder states. It gives the decoder one summary of the input that is tailored to the word it is about to produce.
Implement context_vector(weights, H), which returns the weighted sum of the encoder states.
T positions.Use a matrix product: weights of shape (T,) times states of shape (T, d).
No results yet
Run your code to check it against the examples, or submit to run every test.