blob: a36dc16d1a5897d1b356bd73fb7a6f0db13c9c9c (
plain)
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
|
#!/usr/bin/env bash
# Frozen five-seed test confirmation of the validation-selected K=1/every=4 protocol.
# Usage: query_budget_confirm.sh <gpu> "<seeds>"
set -eu
cd "$(dirname "$0")/.."
GPU="${1:?GPU index required}"
SEEDS="${2:-0 1 2 3 4}"
PYTHON="${PYTHON:-/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3}"
for seed in $SEEDS; do
for spec in dfa:1 sdil:16 sdil:1; do
IFS=: read -r mode ndirs <<EOF
$spec
EOF
if [ "$mode" = dfa ]; then
tag="query_confirm_v1_cifar10_d20_dfa_s${seed}"
else
tag="query_confirm_v1_cifar10_d20_k${ndirs}_e4_s${seed}"
fi
out="results/${tag}.json"
if [ -s "$out" ]; then
echo "[$tag] exists; skipping"
continue
fi
CUDA_VISIBLE_DEVICES="$GPU" "$PYTHON" experiments/run.py \
--mode "$mode" --dataset cifar10 --device cuda \
--depth 20 --width 64 --residual 1 --act tanh \
--epochs 5 --batch_size 128 --eta 0.05 --momentum 0.9 \
--eta_A 0.02 --pert_sigma 0.01 --pert_ndirs "$ndirs" \
--pert_every 4 --pert_mode simultaneous \
--traffic_mode none --nuis_rho 0 --use_residual 0 \
--learn_A 1 --learn_P 0 --p_warmup_steps 0 \
--val_examples 0 --eval_split test \
--diagnostics none --eval_every 0 --seed "$seed" \
--log_every 100000 --tag "$tag"
done
done
|