We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
easy
primitives
Implement Embedding Lookup
Implement an embedding lookup operation.
Given a weight matrix (embedding table) and a list of indices, return the corresponding embedding vectors.
Input:
-
weight: embedding matrix of shape(vocab_size, embed_dim) -
indices: 1D integer tensor of shape(seq_len,)
Output: Tensor of shape (seq_len, embed_dim) with the looked-up embeddings
Hints
embedding
nlp
basics
Sign in to attempt this problem and view the solution.