Fasttext could handle OOV easily, i.e., it could be assumed that emb = fasttext_model(raw_input)
always holds. However, I am not sure how I could build this layer into tf.keras
embedding. I couldn't simply load the matrix into Embedding
because in that way the OOV couldn't be handled. Is there a walkaround that I could use fasttext_model
in a tf.keras
model?
Asked
Active
Viewed 626 times
5

Mr.cysl
- 1,494
- 6
- 23
- 37
-
1Did you try this approach? It seems to work. https://stackoverflow.com/questions/62743531/using-gensim-fasttext-model-with-lstm-nn-in-keras – Stefano Fiorucci - anakin87 Oct 06 '20 at 07:58