Use output of nn.Embed as a Layer #1981
Answered
by
marcvanzee
pharringtonp19
asked this question in
Q&A
-
@matthias-wright provides a nice example of how to use I would like to extend his example by using the output of
|
Beta Was this translation helpful? Give feedback.
Answered by
marcvanzee
Mar 10, 2022
Replies: 1 comment 4 replies
-
In your example you have a 10x5 embedding table (i.e., 10 embeddings of size 5). Do you mean you want to add a linear layer after the embedding layer? Then you should use |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
pharringtonp19
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In your example you have a 10x5 embedding table (i.e., 10 embeddings of size 5).
emb
contains the embeddings of your inputc
using that embedding table (so it is an array), soemb(x)
doesn't mean anything.Do you mean you want to add a linear layer after the embedding layer? Then you should use
Dense
and pass itemb
.