Reputation: 53
I'm trying to understand how PyTorch creates embeddings and read the source code of torch.nn.functional.embedding
github link.
The function returns the result of torch.embedding(weight, input, padding_idx, scale_grad_by_freq, sparse)
.
Then, I try to understand the definition of torch.embedding
but I can't find its source code in the GitHub repository. Where is it?
Upvotes: 5
Views: 1985