From d1dc70ba0bdbb856c1f34679661551fb9ca36fee Mon Sep 17 00:00:00 2001 From: IgorSusmelj Date: Fri, 17 Jan 2025 17:55:36 +0100 Subject: [PATCH 1/2] Update SimCLR model docs --- docs/source/examples/simclr.rst | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/docs/source/examples/simclr.rst b/docs/source/examples/simclr.rst index 8f5833cd6..f83047821 100644 --- a/docs/source/examples/simclr.rst +++ b/docs/source/examples/simclr.rst @@ -3,7 +3,21 @@ SimCLR ====== -Example implementation of the SimCLR architecture. +SimCLR is a framework for self-supervised learning of visual representations using contrastive learning. It aims to maximize agreement between different augmented views of the same image. + +Key Components +-------------- + +- **Data Augmentations**: SimCLR uses random cropping, resizing, color jittering, and Gaussian blur to create diverse views of the same image. +- **Backbone**: Convolutional neural networks, such as ResNet, are employed to encode augmented images into feature representations. +- **Projection Head**: A multilayer perceptron (MLP) maps features into a space where contrastive loss is applied, enhancing representation quality. +- **Contrastive Loss**: The normalized temperature-scaled cross-entropy loss (NT-Xent) encourages similar pairs to align and dissimilar pairs to diverge. + +Good to Know +---------------- + +- **Backbone Networks**: SimCLR is specifically optimized for convolutional neural networks, with a focus on ResNet architectures. We do not recommend using it with transformer-based models. +- **Learning Paradigm**: SimCLR is based on contrastive learning which makes it sensitive to the augmentations you pick and the method benefits from larger batch sizes. Reference: `A Simple Framework for Contrastive Learning of Visual Representations, 2020 `_ From 2ddf4a874ff3b5a8a0b872a96f9978d97be24d59 Mon Sep 17 00:00:00 2001 From: IgorSusmelj Date: Tue, 21 Jan 2025 10:37:39 +0100 Subject: [PATCH 2/2] Update first paragraph --- docs/source/examples/simclr.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/examples/simclr.rst b/docs/source/examples/simclr.rst index f83047821..54b57d05a 100644 --- a/docs/source/examples/simclr.rst +++ b/docs/source/examples/simclr.rst @@ -3,7 +3,7 @@ SimCLR ====== -SimCLR is a framework for self-supervised learning of visual representations using contrastive learning. It aims to maximize agreement between different augmented views of the same image. +SimCLR is a self-supervised framework for visual representation learning using contrastive methods. It learns by creating two augmented views of the same image—using random cropping, color jitter, and Gaussian blur—then maximizing agreement between these augmented views while separating them from other images. Key findings include the importance of strong compositions of data augmentations, a nonlinear projection head that boosts representation quality, and the advantages of large batch sizes. Combined, these elements allow SimCLR to approach or match supervised performance on ImageNet and achieve strong transfer and semi-supervised learning results. Key Components --------------