forked from Aboriginer/EOE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.sh
executable file
·57 lines (48 loc) · 1.41 KB
/
eval.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
export CUDA_VISIBLE_DEVICES=0
# datasets=('bird200' 'car198' 'food101' 'pet37' 'ImageNet')
# task='far'
# L=500
# datasets=('ImageNet10' 'ImageNet20' 'ImageNet')
# task='near'
# L=3
datasets=('cub100_ID' 'car98_ID' 'food50_ID' 'pet18_ID')
task='fine_grained'
L=500
for dataset in "${datasets[@]}"
do
for i in {0..3}; do
echo "Running experiment with dataset=${dataset}, iteration=${i}, model=CLIP"
python3 eval_ood_detection.py \
--llm_model 'gpt-3.5-turbo-16k' \
--ood_task "${task}" \
--score_ablation "EOE" \
--L "${L}" \
--in_dataset "${dataset}" \
--score 'EOE' \
--json_number ${i} \
--model CLIP \
--CLIP_ckpt ViT-B/16 \
--beta 0.25 \
# --generate_class # You can directly comment `generate_class` if you want to use the generated classes from JSON file
done
done
for dataset in "${datasets[@]}"
do
echo "Running experiment with dataset=${dataset}"
python3 eval_ood_detection.py \
--ood_task "${task}" \
--in_dataset "${dataset}" \
--score 'MCM'
echo "Running experiment with dataset=${dataset}"
python3 eval_ood_detection.py \
--ood_task "${task}" \
--in_dataset "${dataset}" \
--score 'max-logit'
echo "Running experiment with dataset=${dataset}"
python3 eval_ood_detection.py \
--ood_task "${task}" \
--in_dataset "${dataset}" \
--score 'energy' \
--T 0.01
done