Skip to content
samiouabrkPublic

About

PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SimCLR on CIFAR-10

A PyTorch implementation of SimCLR (contrastive self-supervised learning) with a ResNet-18 encoder, pretrained on CIFAR-10 without labels and evaluated with linear probing, k-NN, label efficiency, CIFAR-100 transfer, and batch size / temperature ablations.

Results

Evaluation (frozen encoder) Top-1
Linear probe, 100% labels 82.44%
Linear probe, 1% labels 78.48%
10-NN 82.25%
Transfer to CIFAR-100 (linear probe) 32.42%

Usage

pip install -r requirements.txt

Open src/simclr.ipynb. CIFAR-10/100 download automatically. Full pretraining takes ~2.5 h on a T4 GPU, so the pretrained encoder and ablation checkpoints are available via the links in data/model.txt; place them next to the notebook.

About

PyTorch implementation of SimCLR: A Simple Framework for Contrastive Learning of Visual Representations

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages