Skip to content

Commit

Permalink
final
Browse files Browse the repository at this point in the history
  • Loading branch information
zybeich committed May 1, 2024
1 parent 0cf544c commit 935f1f5
Show file tree
Hide file tree
Showing 341 changed files with 34,258 additions and 29,894 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

137 changes: 0 additions & 137 deletions GettingStarted.md

This file was deleted.

12 changes: 0 additions & 12 deletions MANIFEST.in

This file was deleted.

69 changes: 0 additions & 69 deletions Makefile

This file was deleted.

41 changes: 41 additions & 0 deletions OT3P.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
data_dir=$DATA_DIR
dataset=$1


for seed in 2
do

# 1src
for src in 0 1 2 3
do
for trg in 0 1 2 3
do

if [ $src -ne $trg ]
then

python -m domainbed.scripts.prompt_tta \
--data_dir $data_dir --steps 51 \
--dataset $dataset\
--train_envs $src --test_envs $trg\
--output_dir results_tta/erm_1src/$dataset_$seed/$src/tta_$trg \
--hparams '{"prompt_dim": 4, "lr_prompt": 1e-1, "batch_size": 128}' \
--restore results_erm/erm_1src/$dataset_$seed/$src/best_model.pkl

fi
done
done


# 3src
for trg in 0 1 2 3
do
python -m domainbed.scripts.prompt_tta \
--data_dir $data_dir --steps 51 \
--dataset $dataset\
--test_envs $trg\
--output_dir results_tta/erm_3src/$dataset_$seed/tta_$trg \
--hparams '{"prompt_dim": 4, "lr_prompt": 1e-1, "batch_size": 128}' \
--restore results_erm/erm_3src/$dataset_$seed/$trg/best_model.pkl
done
done
Binary file not shown.
61 changes: 61 additions & 0 deletions baseline_tta.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
dataset=$1

for seed in 1 2
do

for src in 0 1 2 3
do
for trg in 0 1 2 3
do

if [ $src -ne $trg ]
then
# 1src
python -m domainbed.scripts.tta \
--input_dir results_erm/erm_1src/pacs_$seed/${pacs[$src]}\
--test_envs $trg\
--output_dir results_tent/erm_1src/pacs_$seed/${pacs[$src]}/tta_${pacs[$trg]} \
--adapt_algorithm T3A

python -m domainbed.scripts.tta \
--input_dir results_erm/erm_1src/pacs_$seed/${pacs[$src]}\
--test_envs $trg\
--output_dir results_tent/erm_1src/pacs_$seed/${pacs[$src]}/tta_${pacs[$trg]} \
--adapt_algorithm TentPreBN

python -m domainbed.scripts.tta \
--input_dir results_erm/erm_1src/pacs_$seed/${pacs[$src]}\
--test_envs $trg\
--output_dir results_tent/erm_1src/pacs_$seed/${pacs[$src]}/tta_${pacs[$trg]} \
--adapt_algorithm TentClf


fi
done
done


for trg in 0 1 2 3
do

python -m domainbed.scripts.tta \
--input_dir results_erm/erm_3src/pacs_$seed/${pacs[$trg]}\
--test_envs $trg\
--output_dir results_tent/erm_3src/pacs_$seed/tta_${pacs[$trg]} \
--adapt_algorithm T3A

python -m domainbed.scripts.tta \
--input_dir results_erm/erm_3src/pacs_$seed/${pacs[$trg]}\
--test_envs $trg\
--output_dir results_tent/erm_3src/pacs_$seed/tta_${pacs[$trg]} \
--adapt_algorithm TentPreBN

python -m domainbed.scripts.tta \
--input_dir results_erm/erm_3src/pacs_$seed/${pacs[$trg]}\
--test_envs $trg\
--output_dir results_tent/erm_3src/pacs_$seed/tta_${pacs[$trg]} \
--adapt_algorithm TentClf

done

done
1 change: 0 additions & 1 deletion credentials.json

This file was deleted.

5 changes: 0 additions & 5 deletions docs/Gemfile

This file was deleted.

7 changes: 0 additions & 7 deletions docs/README.md

This file was deleted.

Loading

0 comments on commit 935f1f5

Please sign in to comment.