Skip to content

Commit

Permalink
Rename finetune_new and pretrain_new to finetune and pretrain
Browse files Browse the repository at this point in the history
  • Loading branch information
itsnamgyu committed Aug 7, 2022
1 parent 15ae15f commit 1abfde4
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 1,120 deletions.
518 changes: 211 additions & 307 deletions finetune.py

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions finetune.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
export CUDA_VISIBLE_DEVICES=0


SOURCES=("miniImageNet" "tieredImageNet" "ImageNet")
SOURCE=${SOURCES[0]}

TARGETS=("CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars")
TARGET=${TARGETS[0]}

# BACKBONE=resnet10 # for mini
BACKBONE=resnet18 # for tiered and full imagenet

N_SHOT=5


# Source SL
for TARGET in "CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars"; do
python finetune.py --ls --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "base" --tag "default" --n_shot $N_SHOT
done

# Target SSL
for TARGET in "CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars"; do
python finetune.py --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "default" --n_shot $N_SHOT
python finetune.py --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "default" --n_shot $N_SHOT
done

# MSL (Source SL + Target SSL)
for TARGET in "CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars"; do
python finetune.py --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "gamma78" --n_shot $N_SHOT
python finetune.py --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "gamma78" --n_shot $N_SHOT
done

# Two-Stage SSL (Source SL -> Target SSL)
for TARGET in "CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars"; do
python finetune.py --pls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "default" --n_shot $N_SHOT
python finetune.py --pls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "default" --n_shot $N_SHOT
done

# Two-Stage MSL (Source SL -> Source SL + Target SSL)
for TARGET in "CropDisease" "ISIC" "EuroSAT" "ChestX" "places" "cub" "plantae" "cars"; do
python finetune.py --pls --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "simclr" --tag "gamma78" --n_shot $N_SHOT
python finetune.py --pls --ls --ut --source_dataset $SOURCE --target_dataset $TARGET --backbone $BACKBONE --model "byol" --tag "gamma78" --n_shot $N_SHOT
done
222 changes: 0 additions & 222 deletions finetune_new.py

This file was deleted.

24 changes: 0 additions & 24 deletions finetune_new.sh

This file was deleted.

Loading

0 comments on commit 1abfde4

Please sign in to comment.