Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Embed layer #2032
Conversation
jeffdonahue
referenced
this pull request
Mar 4, 2015
Closed
Unrolled recurrent layers (RNN, LSTM) #2033
shelhamer
added JL ES
labels
Mar 7, 2015
jeffdonahue
added the
ready for review
label
Mar 9, 2015
|
Rebased and ready for review. (Previously depended on gradient accumulation PR #1663.) |
futurely
commented
Jul 13, 2015
|
This layer works as a lookup table and could be renamed to LookupTable. |
jeffdonahue
added some commits
Jan 21, 2015
shelhamer
added a commit
that referenced
this pull request
Aug 25, 2015
|
|
shelhamer |
80579b8
|
shelhamer
merged commit 80579b8
into
BVLC:master
Aug 25, 2015
1 check passed
jeffdonahue
deleted the
jeffdonahue:embed-layer branch
Aug 26, 2015
beniz
commented
Dec 8, 2015
•
|
Here is an example of a typical
Understood, of course the padding is to fix the input sequence length. |
jeffdonahue commentedMar 4, 2015
(Replaces #1872)
Based on #1977 (parameter gradient accumulation). This adds EmbedLayer (should probably change the name to EmbeddingLayer for consistency with PoolingLayer etc.), which essentially learns a lookup table for integer inputs, useful for language modeling and such. Its computation is equivalent to an InnerProductLayer with "one-hot" vector inputs, but instead of explicitly representing the one-hot vectors (which wastes lots of memory), this assumes the input itself is the indices of the "hot" index of those one-hot vectors (like the label inputs for the categorical losses). This should probably be replaced with SparseInnerProduct (#937) once that's merged, assuming that's faster -- this is a more lightweight change that continues the unfortunate trend of casting floats to ints as labels.