← all repositories
dalinvip/cnn-lstm-bilstm-deepcnn-clstm-in-pytorch

A zoo of 2018-era text classifiers, still walking

A straightforward PyTorch collection of CNN, LSTM, BiLSTM and friends for sentiment classification, frozen in time at PyTorch 1.0.1.

1.4k stars Python ML FrameworksLanguage Models
cnn-lstm-bilstm-deepcnn-clstm-in-pytorch
Velocity · 7d
+0.4
★ / day
Trend
steady
star history

What it does

This repo bundles several classic neural architectures—CNN, LSTM, Bi-LSTM, Bi-GRU, plus variants like deep CNN and highway CNN—into a single sentiment classification pipeline for the SST-1 and SST-2 datasets. You pick a model in a config file, point at data, and run. It’s essentially a reference implementation sampler for text classification circa 2018.

The interesting bit

The author explicitly notes they “haven’t adjusted the hyper-parameters seriously,” which is either refreshing honesty or a warning, depending on your mood. The results table shows Bi-GRU edging out Bi-LSTM on SST-2 (86.77% vs 86.33%), but all scores are modest by modern standards—this is a teaching tool, not a leaderboard entry.

Key highlights

  • Ships with 7+ model variants in one codebase (CNN, LSTM, BiLSTM, GRU, deep CNN, highway CNN, C-LSTM)
  • Config-driven: swap architectures by editing a .cfg file, no code changes needed
  • Includes training logs and a run.sh script for batch experiments
  • CUDA 8.0 support (though “pyorch” typo in requirements suggests minimal maintenance)
  • Author’s newer BERT repo is linked as the successor project

Caveats

  • PyTorch 1.0.1 and torchtext 0.2.1 are ancient; expect dependency archaeology to run this today
  • The “deep CNN” and “C-LSTM” models are mentioned in the repo name but not documented in the README results table—unclear if they’re fully implemented or just aspirational
  • Two of the three reference links point to the same arXiv PDF, suggesting a copy-paste slip

Verdict

Worth a quick browse if you’re teaching or learning how these classic text-classification architectures hang together in PyTorch. Skip it if you need something production-ready or state-of-the-art; the author themselves point to their BERT repo for that.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.