SVAIGBA / WMSeg

MIT License
172 stars 42 forks source link

about word_embedding_c of WordKVMN #8

Open Alexia1994 opened 3 years ago

Alexia1994 commented 3 years ago

Excuse me, why self.word_embedding_c = nn.Embedding(10, hidden_size)? I do not really understand why is 10. Thanks for your answering : )

yuanheTian commented 3 years ago

Excuse me, why self.word_embedding_c = nn.Embedding(10, hidden_size)? I do not really understand why is 10. Thanks for your answering : )

Thanks for asking!

That number actually should be the size of the value set. We map the value to its corresponding index in line 353 of wmseg_model.py. The range of the value index should be [0, 4]. So, using 10 here will be enough to map the index to its embedding.