dennybritz / cnn-text-classification-tf

Convolutional Neural Network for Text Classification in Tensorflow
Apache License 2.0
5.65k stars 2.77k forks source link

Extreme large vocabulary #62

Open binxuan opened 7 years ago

binxuan commented 7 years ago

I recently met a problem that the training algorithm becomes much slower when the vocabulary size gets extreme large. There is a warning from tensorflow saying that "Converting sparse IndexedSlices to a dense Tensor with 145017088 elements. This may consume a large amount of memory."

I guess Tensorflow is using a dense gradient update on the embedding matrix. Does anyone have any ideas on that?

Thanks

fuzhenxin commented 6 years ago

I meet the same problem, have you solved it? Thank you!