#!/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 \ # "" "" 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