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.
| 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% |
pip install -r requirements.txtOpen 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.

