text_gcn
text_gcn copied to clipboard
How do you get the top 10 words for each class ?
@Dinxin
The dimension of the second layer node (word/doc) embeddings is the same as the number of classes, the top 10 words with highest value in each dimension will be the top 10 words for each class.
Changing "model.layers[0].embedding" in line 120, train.py to "model.layers[1].embedding, then "word_embeddings" in line 161, train.py will be the word embeddings, you can choose top 10 words in each dimension (class).