Self supervised learning
What makes a good representation?
- A good representation vector captures the important features of the image as it relates to the rest of the dataset
Contrastive Learning: SimCLR
- New architecture which uses contrastive learning
Given an image x, SimCLR uses two data augmentation schemes t and t’ to generate positive parif of images.
Pretrained weights
Available at http://downloads.cs.stanford.edu/downloads/cs231n/pretrained_simclr_model.pth
The random transformations
- Randomly resize and crop to 32x32.
- Horizontally flip the image with probability 0.5
- With a probability of 0.8, apply color jitter
- With a probability of 0.2, convert the image to grayscale
Answer
Understand SimCLR Mode
SimCLR: Contrastive Loss
Implement sim
Answer
Implement simclr_loss_naive
Answer
Implement sim_positive_pairs
Answer
Implement compute_sim_matrix
Answer
Implement simclr_loss_vectorized
Answer
Implement train function
Answer