Practical overview
When it fits
Use SWEM when you need the repository’s specific word-embedding classification experiments and can work with its documented Python 2.7, CUDA, cuDNN and TensorFlow prerequisites.
Who it is for
- Researchers reproducing the paper’s text classification experiments.
- Developers studying word-embedding representations and pooling methods.
Documented uses
- Run ontology classification experiments with DBpedia data.
- Run natural language inference experiments with SNLI data.
- Run topic categorization experiments with Yahoo Answers data.
- Compare SWEM and CNNs through subspace training for intrinsic-dimension experiments.
Requirements & limits
- The README specifies Python 2.7 and TensorFlow above 1.0, with TensorFlow 1.5 used by the authors.
- The prepared datasets are available as pickle files and vary considerably in size.
- Evaluation settings can be adjusted in the option class, including embedding size, dropout keep rate, learning rate, batch size and hidden-layer dimension.
- The README reports approximate training time on a K80 GPU; those estimates are hardware-specific.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run an included evaluation script
Reproduce one of the repository’s documented DBpedia, SNLI or Yahoo evaluation runs.
Before you start
- Python 2.7
- CUDA and cuDNN
- TensorFlow version above 1.0; the authors used TensorFlow 1.5
- Install dependencies with
pip install -r requirements.txt - Download the prepared dataset for the chosen task and place it in a
datafolder
Steps
Choose DBpedia ontology classification, SNLI natural language inference, or Yahoo topic categorization.
Download the corresponding prepared pickle data; SNLI also lists a separate word-embeddings file.
Place the downloaded data in a
datafolder.Run the command below, the command below, or the command below for the selected task.
python eval_dbpedia_emb.pypython eval_snli_emb.pypython eval_yahoo_emb.py
Expected outcome
The corresponding task evaluation script runs against the selected prepared dataset.
Guide limitations
- The README documents legacy prerequisites, including Python 2.7 and TensorFlow 1.x-era usage.
- Dataset downloads are substantial: DBpedia is listed at 591 MB, SNLI at 101 MB plus a 129 MB word-embeddings file, and Yahoo at 1.7 GB.
- The repository’s approximate training times are reported for a K80 GPU and should not be treated as a guarantee for other hardware.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- dinghanshen/SWEM · Official homepage title · retained in its source language

