Contrastive Learning with Low-Dimensional Reconstruction
- Python 3.8
- PyTorch 1.13
- OpenCV
Run the following command to train a low-dimensional encoder
python cl_train.py
Run the following command to evaluate the model by (fine-tuning) a linear classifier
python cl_test.py --model_path results/xxx.pth
A pretrained model can be downloaded from here
This code is mainly inspired by SimCLR