HobbitLong/SupContrast
A PyTorch implementation of supervised contrastive learning and SimCLR for training visual representation models.

Velocity · 7d
+1.5
★ / day
Trend
→steady
star history
This repository provides reference implementations of supervised contrastive learning and SimCLR, two contrastive learning methods for training deep learning models on visual representations. The code includes loss functions (SupConLoss), training pipelines on CIFAR, and pre-trained ImageNet models achieving over 79% top-1 accuracy. When labels are provided, it implements SupContrast; without labels, it degenerates to SimCLR.