summaryrefslogtreecommitdiff
path: root/experiments/narrow_depth_sweep.sh
diff options
context:
space:
mode:
authorYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 07:02:04 -0500
committerYurenHao0426 <Blackhao0426@gmail.com>2026-07-21 07:02:04 -0500
commit0f107d1ee4e750421a0e95f8bd06bf0f629d2fa7 (patch)
tree4b31652461d4befd58aafeef17758d4c198d7eb7 /experiments/narrow_depth_sweep.sh
parentc2769e6b18e299b2267662b7c48364e8c220f631 (diff)
feat: multiplex causal probes across hidden layers
Diffstat (limited to 'experiments/narrow_depth_sweep.sh')
-rwxr-xr-xexperiments/narrow_depth_sweep.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/experiments/narrow_depth_sweep.sh b/experiments/narrow_depth_sweep.sh
index 8f62a68..3e4e6b2 100755
--- a/experiments/narrow_depth_sweep.sh
+++ b/experiments/narrow_depth_sweep.sh
@@ -3,7 +3,7 @@
#
# Usage:
# bash experiments/narrow_depth_sweep.sh \
-# <gpu> "<depths>" "<modes>" <width> <seed> <epochs> <prefix>
+# <gpu> "<depths>" "<modes>" <width> <seed> <epochs> <prefix> [pert_mode] [n_dirs]
#
# Example:
# bash experiments/narrow_depth_sweep.sh 5 "30 60" "bp dfa sdil" 64 0 5 pilot_jac
@@ -18,6 +18,8 @@ WIDTH="${4:-64}"
SEED="${5:-0}"
EPOCHS="${6:-5}"
PREFIX="${7:-narrow}"
+PERT_MODE="${8:-layerwise}"
+N_DIRS="${9:-8}"
export CUDA_VISIBLE_DEVICES="$GPU"
export OMP_NUM_THREADS=2
@@ -41,7 +43,7 @@ run_one() {
"$PY" experiments/run.py \
--mode "$mode" --dataset cifar10 --depth "$depth" --width "$WIDTH" \
--act tanh --residual 1 --epochs "$EPOCHS" --seed "$SEED" \
- --eta "$eta" --eta_A 0.02 --pert_ndirs 8 \
+ --eta "$eta" --eta_A 0.02 --pert_ndirs "$N_DIRS" --pert_mode "$PERT_MODE" \
--log_every 500 --probe_bs 256 --tag "$tag" --outdir results \
> "$log" 2>&1
grep -h DONE "$log"