diff options
| author | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-21 07:35:06 -0500 |
|---|---|---|
| committer | YurenHao0426 <Blackhao0426@gmail.com> | 2026-07-21 07:35:06 -0500 |
| commit | c8a372cae2612839bdbdafcf9c114f52cb4a6de3 (patch) | |
| tree | ff86626b565c3533a5771b895e40f90dc1c50619 | |
| parent | 6093fe5eb453947154fe39ddb75740f09eb306ef (diff) | |
feat: add feedback-alignment depth sweep
| -rwxr-xr-x | experiments/baseline_depth_sweep.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/experiments/baseline_depth_sweep.sh b/experiments/baseline_depth_sweep.sh new file mode 100755 index 0000000..2a8fa6d --- /dev/null +++ b/experiments/baseline_depth_sweep.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Depth-scaling sweep for sequential Feedback Alignment on the exact narrow +# residual architecture used by BP, DFA, and SDIL. +# +# Usage: +# bash experiments/baseline_depth_sweep.sh \ +# <gpu> "<depths>" <width> "<seeds>" <epochs> <prefix> +set -eu + +cd "$(dirname "$0")/.." +PY=/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3 +GPU="${1:?GPU index required}" +DEPTHS="${2:-30 60}" +WIDTH="${3:-64}" +SEEDS="${4:-0}" +EPOCHS="${5:-5}" +PREFIX="${6:-fa_scale}" + +export CUDA_VISIBLE_DEVICES="$GPU" +export OMP_NUM_THREADS=2 +mkdir -p results logs/baselines + +for seed in $SEEDS; do + for depth in $DEPTHS; do + tag="${PREFIX}_cifar10_fa_w${WIDTH}_d${depth}_s${seed}" + result="results/${tag}.json" + log="logs/baselines/${tag}.log" + if [[ -f "$result" ]]; then + echo "skip $tag (result exists)" + continue + fi + echo ">>> $tag $(date --iso-8601=seconds) gpu=$GPU" + "$PY" experiments/baseline_run.py \ + --method fa --dataset cifar10 --depth "$depth" --width "$WIDTH" \ + --act tanh --residual 1 --epochs "$EPOCHS" --seed "$seed" \ + --eta 0.05 --batch_size 128 --tag "$tag" --outdir results \ + > "$log" 2>&1 + grep -h DONE "$log" + done +done |
