#!/usr/bin/env bash # Corrected sweep (sigma-scale fixed). Mode-specific LR. # Usage: bash run_v2.sh "" "" set -u; cd "$(dirname "$0")/.." PY=/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3 export OMP_NUM_THREADS=2 DS="$1"; DEPTHS="$2"; RES="$3"; ACT="$4"; SEEDS="$5"; EP="$6"; PFX="$7" OUT=results; LOGS=logs/v2; mkdir -p "$OUT" "$LOGS"; PROG="$LOGS/progress.txt" echo "=== v2 $(date) ds=$DS depths=[$DEPTHS] res=$RES act=$ACT seeds=[$SEEDS] ===" >> "$PROG" run(){ local tag="$1"; shift; [ -f "$OUT/$tag.json" ] && { echo "skip $tag">>"$PROG"; return; } 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 run "${PFX}_${DS}_bp_d${d}_s${s}" --mode bp --dataset $DS --depth $d --width 256 --act $ACT --residual $RES --epochs $EP --seed $s --eta 0.05 run "${PFX}_${DS}_dfa_d${d}_s${s}" --mode dfa --dataset $DS --depth $d --width 256 --act $ACT --residual $RES --epochs $EP --seed $s --eta 0.05 run "${PFX}_${DS}_sdil_d${d}_s${s}" --mode sdil --dataset $DS --depth $d --width 256 --act $ACT --residual $RES --epochs $EP --seed $s --eta 0.02 --eta_A 0.02 --pert_ndirs 8 done; done echo "=== v2 done $(date) ===" >> "$PROG"