Skip to content

joseph-nagel/contrastive-learning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contrastive learning

2D embeddings of the MNIST test dataset

This repo contains an example of contrastive representation learning. An embedding can be trained in such a way that similar samples (sharing the same label) are pulled together, while dissimilar ones (with different labels) are pushed apart.

Installation

pip install -e .

Training

python scripts/main.py fit --config config/mnist.yaml

Notebooks