Tencent / NeuralNLP-NeuralClassifier

An Open-source Neural Hierarchical Multi-label Text Classification Toolkit
Other
1.83k stars 402 forks source link

How to use pre-trained embedding? #40

Closed LxinG-YY closed 4 years ago

LxinG-YY commented 4 years ago

Can I use pre-trained embedding like word2vec or ELMO embedding in the embedding layer and how to apply?

liqunhit commented 4 years ago

For static embeddings, like word2vec, set the config item "token_pretrained_file" as file path of pretrained embedding. For dynamic embeddings, like ELMO, due to its flexible use, it needs to be developed by users themselves.