From 262c6d9ef3f0461218c1a5e632fc7dd6357e0a20 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Tue, 21 Jul 2026 08:48:04 -0500 Subject: feat: add parameter-matched EP comparison --- experiments/ep_matched_sweep.sh | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 experiments/ep_matched_sweep.sh (limited to 'experiments/ep_matched_sweep.sh') 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 "" "" [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 -- cgit v1.2.3