Skip to content
/ SimCLR Public
forked from sthalles/SimCLR

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

Notifications You must be signed in to change notification settings

pckuo/SimCLR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Check out the Blog post with full documentation: Exploring SimCLR: A Simple Framework for Contrastive Learning of Visual Representations

Config file

Before runing SimCLR, make sure you choose the correct running configurations on the config.yaml file.

batch_size: 256 # A batch size of N, produces 2 * (N-1) negative samples. Original implementation uses a batch size of 8192
out_dim: 64 # Output dimensionality of the embedding vector z. Original implementation uses 2048
s: 1
temperature: 0.5 # Temperature parameter for the contrastive objective
base_convnet: "resnet18" # The ConvNet base model. Choose one of: "resnet18 or resnet50". Original implementation uses resnet50
use_cosine_similarity: True # Distance metric for contrastive loss. If False, uses dot product
epochs: 40 # Number of epochs to train
num_workers: 4 # Number of workers for the data loader

Feature Evaluation

For a simple assessment of SimCLR using STL-10 and ResNet-18, check the feature_eval/FeatureEvaluation.ipynb notebook.

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 66.8%
  • Python 33.2%