SupContrast
This reference implementation explores supervised contrastive learning using SupConLoss, as outlined in influential arXiv papers. It compares SupContrast with cross-entropy and SimCLR methods, showing improved accuracy on CIFAR-10, CIFAR-100, and ImageNet datasets. The project employs PyTorch with CIFAR for demonstrations. A simplified SupConLoss implementation aids understanding and application, allowing for mode flexibility between supervised and unsupervised learning. Using the ResNet50 architecture, SupContrast achieves high top-1 accuracy through slight adjustments with the momentum encoder. Detailed commands and guidance facilitate easy model deployment for integrating contrastive learning.