-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6604286
commit dfb8fec
Showing
19 changed files
with
80,012 additions
and
9,948 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,4 +134,5 @@ checkpoint/ | |
checkpoints/ | ||
|
||
*.zip | ||
aurocs/ | ||
aurocs/ | ||
pacscheck/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export CUDA_VISIBLE_DEVICES='0' | ||
python train.py --dataset cifar100 --model resnet56 --epochs 160 --schedule-steps 80 120 --loss LogitNorm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# iterate on random seeds and check if the PACS is working | ||
|
||
import os | ||
import json | ||
base=" python train.py --dataset pacs --model resnet_pacs --train-batch-size 256 --test-batch-size 256 --epochs 30 --schedule-steps 20 --lr 0.01 --seed " | ||
losses=["cross_entropy"] | ||
import sys | ||
args=sys.argv | ||
# main function | ||
for seed in range(int(args[1]),int(args[2])): | ||
for loss in losses: | ||
sces=[] | ||
# for a seed execute command and store the console output | ||
os.system(base+str(seed)+" --loss "+loss+" --target_type=art"+" 2> pacscheck/"+str(seed)+".txt") | ||
with open('train_results_anirudha.json') as f : | ||
data = json.load(f) | ||
sces.append(data[-1]['SCE']) | ||
# collect result from json object | ||
os.system(base+str(seed)+" --loss "+loss+" --target_type=cartoon"+" 2> pacscheck/"+str(seed)+".txt") | ||
with open('train_results_anirudha.json') as f : | ||
data = json.load(f) | ||
sces.append(data[-1]['SCE']) | ||
os.system(base+str(seed)+" --loss "+loss+" --target_type=sketch"+" 2> pacscheck/"+str(seed)+".txt") | ||
with open('train_results_anirudha.json') as f : | ||
data = json.load(f) | ||
sces.append(data[-1]['SCE']) | ||
# store the results in csv | ||
with open('pacscheck.csv', 'a') as f: | ||
f.write(str(seed)+","+str(sces[0])+","+str(sces[1])+","+str(sces[2])+","+str((sces[0]+sces[1]+sces[2])/3)+"\n") | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.