HobbitLong/SupContrast
PyTorch implementation of "Supervised Contrastive Learning" (and SimCLR incidentally) observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2308
- days_rel: n/a
- days_push: 981
- n_releases_24m: 0
Adoption not part of the score
3449 stars · 553 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
A PyTorch reference implementation of the Supervised Contrastive Learning paper (SupCon loss) that also supports SimCLR when labels are omitted. It includes training scripts for CIFAR-10/100 and ImageNet experiments with ResNet architectures.
Use cases
- implement supervised contrastive learning in pytorch
- train a simclr model on cifar
- compute supcon loss for representation learning
- reproduce supervised contrastive learning paper results
- learn contrastive loss implementation details
- pretrain image encoders with contrastive objectives
When to choose
- you need a reference implementation of the SupCon loss in PyTorch
- you want to reproduce the paper's CIFAR or ImageNet results
- you want a simple loss module that falls back to SimCLR without labels
When to avoid
- you need a maintained production training framework
- you want a general-purpose self-supervised library with many methods
- you need support for frameworks other than PyTorch
Facets
library · maturity maintenance
machine-learning deep-learning machine-learning deep-learning computer-vision python pytorch contrastive-learning simclr supervised-contrastive-loss self-supervised-learning representation-learning cifar research-code gpu
1 source
- readme: https://github.com/HobbitLong/SupContrast · fetched 2026-08-28 · e52765e4baf1
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| HobbitLong/SupContrast | main | 32 |
For agents
markdown · JSON · MCP: product_card(name="HobbitLong/SupContrast")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem