- PyTorch
- Pytorch-Lightning
- scikit-learn
conda env create -n <env_name> environment.yml
conda activate <env_name>
Our code only supports single-gpu and single-machine training currently.
To perform self-supervised training of a ResNet-32 model on CIFAR-100, run:
python main.py --epochs 200 --dataset cifar100 -a resnet32 --mlp-dim 256 --out-dim 128 -b 64 -t 0.1 --con 0.1 --eps 0.3 0.5 --exp-dir logs --exp-name DBPCL_cifar100_res32_bs64_eps35_round1 --seed 1 --warmup-epoch 0 [dataset folder]
run python eval_cli.py --help
for details.
python eval_cli.py --method lr --bs 32 --cuda 0 --j 0 --model-path [model checkpoint file] --data-folder [dataset folder] --dataset [dataset]
python eval_cli.py --method ann --bs 32 --cuda 0 --j 4 --model-path [model checkpoint file] --data-folder [dataset folder] --dataset [dataset] --finetune
pretrain dataset | epochs | backbone | link |
---|---|---|---|
CIFAR-10 | 200 | ResNet-32 | download |
CIFAR-100 | 200 | ResNet-32 | download |
STL-10 | 200 | ResNet-32 | download |
Tiny-ImageNet | 200 | ResNet-32 | download |