// the find
dennybritz/cnn-text-classification-tf
Convolutional Neural Network for Text Classification in Tensorflow
A TensorFlow implementation of Kim's 2014 CNN-for-text-classification paper, built as a companion to a WildML blog post. It trains a multi-filter CNN on the MR movie review dataset for binary sentiment classification. This is a teaching artifact, not a production library.
The code maps directly to the paper's architecture, making it useful for anyone trying to understand how filter sizes 3/4/5 work together. The training loop is clean and easy to follow — dropout, L2 regularization, and batch training are all wired up in one place. It includes the original Rotten Tomatoes polarity dataset, so you can run it without finding your own data first.
Requires TensorFlow > 0.12, which is ancient — TF2 has a completely different API and this won't run without a compatibility shim or a very old environment. There's no pretrained word embeddings support; random initialization limits accuracy versus using GloVe or Word2Vec. The data loading in data_helpers.py is hardcoded to the MR dataset with no clean interface for plugging in your own corpus. Last meaningful activity was years ago — this is frozen in 2015-era TensorFlow idioms.