Skip to content

gdao-research/cpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contrastive Predictive Coding

Reproduce of Representation Learning with Contrastive Predictive Coding paper in image recognition task.

I trained CPC to encode image into a representation vector which significantly has lower dimension on augmented MNIST dataset. The linear model applied directly on pixel image only reached 54% accuracy. However, after transform into representation vector, the image recognition task achieved 90% accuracy. This show that good representation has been learned through the unsupervised learning process.

The TSNE visualization of representation vector on 10000 augmented test images:

How to Use

  • Build Docker image from Dockerfile
  • Learn representation transformation model with python main.py
  • Run benchmark model on raw pixel with python linear_benchmark.py
  • Run linear CPC to compare with python linear_cpc.py

About

An Implementation of Contrastive Predictive Coding in TensorFlow 2.1

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors