SupContrast
Visit ToolSupContrast is an open-source PyTorch implementation for Supervised Contrastive Learning and SimCLR. It provides a reference for these methods, demonstrating their application with CIFAR datasets.
At a glance
Trending
SupContrast is an open-source PyTorch implementation for Supervised Contrastive Learning and SimCLR. It provides a reference for these methods, demonstrating their application with CIFAR datasets.
Trending
About
SupContrast offers a PyTorch implementation of "Supervised Contrastive Learning" and, incidentally, "A Simple Framework for Contrastive Learning of Visual Representations" (SimCLR). This repository serves as a reference, illustrating these methods using CIFAR datasets. It includes a `SupConLoss` function that takes features and labels, degenerating to SimCLR loss if labels are not provided. The implementation provides comparison results on CIFAR-10 and CIFAR-100, showcasing improved accuracy over standard cross-entropy. It also details running instructions for standard cross-entropy, supervised contrastive learning, and SimCLR, including pretraining and linear evaluation stages, and supports custom datasets.
Capabilities
Pricing & Plans
Open Source
Free
FAQs
Trending