summaryrefslogtreecommitdiff
path: root/experiments
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 09:45:26 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 09:45:26 -0500
commite7ed10b4cfc0f248412db93c548dc602f963ff7d (patch)
tree08cbb90f7e2c9ee1d926f5e3cc62a5db66db9efe /experiments
parentf2b6107e20975aa649c4ab36b3faab21d1e3c281 (diff)
experiments: add exact shallow EP comparison sweep
Diffstat (limited to 'experiments')
-rwxr-xr-xexperiments/ep_archmatch_sweep.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/experiments/ep_archmatch_sweep.sh b/experiments/ep_archmatch_sweep.sh
new file mode 100755
index 0000000..7cf8abc
--- /dev/null
+++ b/experiments/ep_archmatch_sweep.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+# Exact forward-architecture comparison against canonical d1/w500 EP.
+# All methods use 784-500-10, the first 50k MNIST training examples, and
+# 25 epochs. Feedforward methods retain their native z-score/tanh protocol.
+# Usage: ep_archmatch_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_archmatch_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}_w500_d1_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 1 --width 500 \
+ --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