summaryrefslogtreecommitdiff
path: root/experiments/ep_matched_sweep.sh
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 08:48:04 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 08:48:04 -0500
commit262c6d9ef3f0461218c1a5e632fc7dd6357e0a20 (patch)
tree2ede873d52df1c6082ab0ffedb3813c623beb5cd /experiments/ep_matched_sweep.sh
parent5b9de3f36c91ea8ad57fc4dae5aa0c04f08a7a26 (diff)
feat: add parameter-matched EP comparison
Diffstat (limited to 'experiments/ep_matched_sweep.sh')
-rwxr-xr-xexperiments/ep_matched_sweep.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/experiments/ep_matched_sweep.sh b/experiments/ep_matched_sweep.sh
new file mode 100755
index 0000000..9c23034
--- /dev/null
+++ b/experiments/ep_matched_sweep.sh
@@ -0,0 +1,37 @@
+#!/usr/bin/env bash
+# Near-parameter-matched comparison against the canonical d1/w500 EP run.
+# All methods see the same first 50k MNIST training examples for 25 epochs.
+# Usage: ep_matched_sweep.sh <gpu> "<methods>" "<seeds>" [prefix]
+set -eu
+
+cd "$(dirname "$0")/.."
+PY=/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3
+GPU="${1:?GPU index required}"
+METHODS="${2:-bp dfa sdil}"
+SEEDS="${3:-0}"
+PREFIX="${4:-ep_match_v1}"
+
+export CUDA_VISIBLE_DEVICES="$GPU"
+export OMP_NUM_THREADS=2
+mkdir -p results logs/baselines
+
+for seed in $SEEDS; do
+ for method in $METHODS; do
+ tag="${PREFIX}_mnist_${method}_w256_d3_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/run.py \
+ --mode "$method" --dataset mnist --depth 3 --width 256 \
+ --epochs 25 --batch_size 128 --train_examples 50000 \
+ --eta 0.05 --eta_A 0.02 --eta_P 0.002 --momentum 0.9 \
+ --pert_every 4 --pert_ndirs 16 --pert_mode simultaneous \
+ --nuis_rho 0 --residual 0 --act tanh --seed "$seed" \
+ --tag "$tag" --outdir results > "$log" 2>&1
+ grep -h DONE "$log"
+ done
+done