This example use a (pre-trained GloVe embedding) to convert word to vector, and uses it to train a text classification model on the 20 Newsgroup dataset with 20 different categories.
This example use a (pre-trained GloVe embedding) to convert word to vector, and uses it to train a text classification model on the 20 Newsgroup dataset with 20 different categories. This model can achieve around 90% accuracy after 2 epochs training.
frequency of the word.
index of the word which ranked by the frequency from high to low.
The root directory which containing the training and embedding data
number of the tokens
maximum word to be included
percentage of the training data
size of the mini-batch
size of the embedding vector
learning rate