Practical overview
When it fits
Use it to explore CPC training or the transition from an unsupervised sequence encoder to supervised classification, especially when the documented modified-MNIST example is relevant.
Who it is for
- Researchers and developers exploring unsupervised representation learning for sequential data.
- Practitioners who want to use learned encoder features in a downstream classifier.
Documented uses
- Train an encoder to learn representations from sequences without annotations.
- Use a frozen CPC encoder as a feature source for a supervised classification task.
- Study a toy example of contrastive sequence training and latent-space prediction.
Requirements & limits
- The documented prerequisites are specific older versions: Anaconda Python 3.5.3, Keras 2.0.6 and TensorFlow 1.4.0.
- A GPU is noted as useful for faster training, not as a required prerequisite.
- The repository demonstrates the method on modified-MNIST sequences; using another sequential dataset is a likely-compatible adaptation, not a demonstrated workflow.
- The repository evidence identifies no license.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Train CPC and benchmark its encoder on the included example
Run the documented training and downstream classification stages using the modified-MNIST sequence example.
Before you start
- Anaconda Python 3.5.3
- Keras 2.0.6
- TensorFlow 1.4.0
- A GPU for faster training
Steps
Run the command below to train the CPC model.
python train_model.pyRun the command below to train an MLP on top of the CPC encoder.
python benchmark_model.py
Expected outcome
The repository describes training CPC and then training an MLP classifier using the encoder on the same example data.
Guide limitations
- The documented dataset is a toy set of modified-MNIST sequences, not a general dataset setup guide.
- The README provides no guarantee of results and describes the code as provided as is.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 November 2026
- Original website title
- davidtellez/contrastive-predictive-coding · Official homepage title · retained in its source language

