Skip to content

Correct way to use the embedding layer #883

Answered by avik-pal
VarLad asked this question in Q&A
Discussion options

You must be logged in to vote

That is not the correct way to call Lux layers. See the manual on the interface specification.

x = Embedding(10 => 10)
ps, st = Lux.setup(Random.default_rng(), x)

y = x([1,2,3], ps, st)
z = x(5, ps, st)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by avik-pal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants