summaryrefslogtreecommitdiff
path: root/experiments
diff options
context:
space:
mode:
Diffstat (limited to 'experiments')
-rwxr-xr-xexperiments/baseline_depth_sweep.sh40
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