RNN-based short text classification

  • This is for multi-class short text classification.
  • Model is built with Word Embedding, LSTM, and Fully-connected layer by Pytorch.
  • A mini-batch is created by 0 padding and processed by using torch.nn.utils.rnn.PackedSequence.
  • Cross-entropy Loss + Adam optimizer.

Model

  • Embedding --> Dropout --> LSTM --> Dropout --> FC.

Preprocessing

python preprocessing.py

Training

  • The following command starts training. Run it with -h for optional arguments.
python main.py