diff options
Diffstat (limited to 'experiments/deep_sweep.sh')
| -rw-r--r-- | experiments/deep_sweep.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/experiments/deep_sweep.sh b/experiments/deep_sweep.sh new file mode 100644 index 0000000..15f41a4 --- /dev/null +++ b/experiments/deep_sweep.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +# Deep, no-BN (residual) sweep to expose DFA failure vs SDIL. +# Usage: bash deep_sweep.sh <dataset> "<depths>" <residual> <act> "<seeds>" <epochs> <tag> <gpu> +set -u +cd "$(dirname "$0")/.." +PY=/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3 +export OMP_NUM_THREADS=2 +DS="${1:-cifar10}" +DEPTHS="${2:-5 10 20 30}" +RES="${3:-1}" +ACT="${4:-tanh}" +SEEDS="${5:-0}" +EP="${6:-25}" +PFX="${7:-deep}" +OUT=results +LOGS=logs/deep +mkdir -p "$OUT" "$LOGS" +PROG="$LOGS/progress.txt" +echo "=== deep sweep start $(date) ds=$DS depths=[$DEPTHS] res=$RES act=$ACT seeds=[$SEEDS] ep=$EP ===" >> "$PROG" + +run () { + local tag="$1"; shift + if [ -f "$OUT/$tag.json" ]; then echo "skip $tag" >> "$PROG"; return; fi + echo ">>> $tag $(date +%H:%M:%S)" >> "$PROG" + $PY experiments/run.py --tag "$tag" --outdir "$OUT" "$@" > "$LOGS/$tag.log" 2>&1 \ + && grep -h DONE "$LOGS/$tag.log" >> "$PROG" || echo "FAIL $tag" >> "$PROG" +} + +for s in $SEEDS; do + for d in $DEPTHS; do + for m in bp dfa sdil; do + run "${PFX}_${DS}_${m}_d${d}_s${s}" --mode $m --dataset $DS --depth $d --width 256 \ + --act $ACT --residual $RES --epochs $EP --seed $s --pert_ndirs 8 --eta 0.03 + done + done +done +echo "=== deep sweep done $(date) ===" >> "$PROG" |
