# sthalles/SimCLR

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

Repository: https://github.com/sthalles/SimCLR
Canonical: https://ross.abutalabs.com/products/sthalles-simclr
Homepage: https://sthalles.github.io/simple-self-supervised-learning/
Language: Jupyter Notebook
License: MIT
License Family: permissive
Topics: machine-learning, deep-learning, representation-learning, pytorch-implementation, pytorch, torchvision, unsupervised-learning, contrastive-loss, simclr
Last push: 2024-03-04T10:45:52+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 2389, "days_push": 912, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2491, forks 495 (observed 2026-08-28T04:06:56.420029+00:00)

## What it is
A PyTorch reference implementation of SimCLR, a self-supervised contrastive learning framework for learning visual representations from unlabeled images. It provides configurable training scripts (including mixed-precision AMP support) and a linear-probe evaluation protocol for measuring representation quality on benchmarks like STL10 and CIFAR10.

## Use cases
- train a SimCLR contrastive learning model in PyTorch
- self-supervised pretraining on unlabeled images
- learn visual representations without labeled data
- reproduce SimCLR paper results on STL10 and CIFAR10
- evaluate learned image features with a linear classifier
- pretrain a ResNet encoder for downstream transfer learning

## When to choose
- You want a compact, readable PyTorch implementation of SimCLR to study, run, or extend
- You need to pretrain image encoders on unlabeled data using contrastive learning
- You want a reproducible linear-evaluation setup for comparing representation quality

## When to avoid
- You need large-scale distributed training or support for many datasets and architectures beyond small benchmarks
- You want a broader, actively extended self-supervised learning framework covering newer methods
- You need production-ready supervised training pipelines or off-the-shelf pretrained models for deployment

## Facets
- artifact type: library
- maturity: stable
- function: deep-learning, machine-learning, computer-vision, image-processing
- domain: machine-learning, deep-learning, computer-vision, image-processing
- platform: python, cli
- tags: simclr, contrastive-learning, self-supervised-learning, representation-learning, unsupervised-learning, pytorch, torchvision, resnet, transfer-learning, linear-evaluation, gpu

## Member repositories
- sthalles/SimCLR (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:56.420029+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:27:47.962794+00:00, confidence not recorded.
  - readme: https://github.com/sthalles/SimCLR (fetched 2026-08-28T04:06:56.420029+00:00, sha f96ccce95a48)
  - homepage: https://sthalles.github.io/simple-self-supervised-learning/ (fetched 2026-08-29T10:09:55.778293+00:00, sha f52a18749c61)
- Data as of 2026-08-30T08:39:29.467469+00:00.
