Open lmd1993 opened 5 years ago
Hi, as far as I can see the embedding layer should be the vocab_size as input. But in cbow_model.py of Keras
shared_embedding_layer = Embedding(input_dim=(G.vocab_size+3), output_dim=G.embedding_dimension, weights=[embedding])
Where is the 3 from?
I think +1 is enough. I tried and worked. I think this is because the vocabulary is from 1 - voc + 1 label.
Hi, as far as I can see the embedding layer should be the vocab_size as input. But in cbow_model.py of Keras
shared_embedding_layer = Embedding(input_dim=(G.vocab_size+3), output_dim=G.embedding_dimension, weights=[embedding])
Where is the 3 from?