-
Notifications
You must be signed in to change notification settings - Fork 9
/
pretrain.sh
executable file
·31 lines (21 loc) · 1.8 KB
/
pretrain.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export CUDA_VISIBLE_DEVICES=0
SOURCES=("miniImageNet" "tieredImageNet" "ImageNet")
SOURCE=${SOURCES[2]}
TARGETS=("CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars")
TARGET=${TARGETS[0]}
# BACKBONE=resnet10 # for mini
BACKBONE=resnet18 # for tiered and full imagenet
# Source SL (note, we adapt the torchvision pre-trained model for ResNet18 + ImageNet. Do not use this command as-is.)
python pretrain.py --ls --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "base" --tag "default"
# Target SSL
python pretrain.py --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "default"
python pretrain.py --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "default"
# MSL (Source SL + Target SSL)
python pretrain.py --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "gamma78"
python pretrain.py --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "gamma78"
# Two-Stage SSL (Source SL -> Target SSL)
python pretrain.py --pls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "default" --previous_tag "default"
python pretrain.py --pls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "default" --previous_tag "default"
# Two-Stage MSL (Source SL -> Source SL + Target SSL)
python pretrain.py --pls --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "gamma78" --previous_tag "default"
python pretrain.py --pls --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "gamma78" --previous_tag "default"