onehot_encode dense format ?
Hi mxnet,
It seems that the current implementation of onehot_encode is to convert the indices to a DENSE one-hot representation. Should we change it to represent directly the embedding ?
Right now it seems that handle it using numpy directly and feed that embedding into NDArray is more efficient.
Yes! This is something we should do
Yes, some variant of FullyConnected as Embedding that takes directly one-hot index would be better. Something like this for example.
where could I start working on this issue ? as what @pluskid suggests ? Current implementation prevents us from creating long sequences lstm (memory will blow)
@Kublai-Jing I am working on taking embeding directly. Will PR back today or tomorrow.
awesome !
After https://github.com/dmlc/mxnet/pull/654 merge, embedding problem seems will be solved.
fixed by #654 Please check updated LSTM examples
Actually I found that the embedding version is about 2 times slower than the original one. Is that normal ?
Very informal number from my lstm (in seconds): Embedding version: Iter: 0 batch: 0 taking: 0.494634866714 Iter: 0 batch: 1000 taking: 299.334768057
Fully Connected version: Iter: 0 batch: 0 taking: 0.509057044983 Iter: 0 batch: 1000 taking: 143.694847107