tensorflow implementation of Very Deep Convolutional Networks for Text Classification
I have toy dataset rt_data_all.txt to get you started with the model.
# config the Training flags in main
python main.py
please take a look at predict.py. I have example for both english and chinese
# config the Training flags in main
python predict.py
as shows in paper shortcut is not always helping, so we dont implement shortcut here yet, put it as future TODO.
above table : Evolution of the train/test error on the Yelp Review Full data set for all depths, and with or without shortcut connections (ResNet).
as shows in the table, k max pooling not always helps, so keep to max pooling for now, mark KmaxPooling as TODO
above Table : Testing error of our models on the 8 data sets. The deeper the networks the lower the error for all pooling types. No data preprocessing or augmentation is used.
each sentence should be separated by line.
for each line, it starts with the training sentence, followed by the label.
label should be started with __label__
just to be consistent with fasttext input format
following is a few examples, where 'pos' and 'neg' are labels.
the thing looks like a made-for-home-video quickie . __label__neg
effective but too-tepid biopic __label__pos
uniform sample from different category[weighted sample][precision/recall/f1][give different weights to the positive and negative examples in the training criterion.]
prototxt config
optimize readin data queue
add shortcut
add kMaxPooling
fold for dynamic graph