From cd99d6b874d9d09b3bb87b8485cc787885af71f1 Mon Sep 17 00:00:00 2001 From: YurenHao0426 Date: Tue, 13 Jan 2026 23:49:05 -0600 Subject: init commit --- scripts/run_stable_init.sbatch | 60 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 scripts/run_stable_init.sbatch (limited to 'scripts/run_stable_init.sbatch') diff --git a/scripts/run_stable_init.sbatch b/scripts/run_stable_init.sbatch new file mode 100644 index 0000000..eefe6bb --- /dev/null +++ b/scripts/run_stable_init.sbatch @@ -0,0 +1,60 @@ +#!/bin/bash +#SBATCH --job-name=snn_stable +#SBATCH --account=bfqt-delta-gpu +#SBATCH --partition=gpuA40x4 +#SBATCH --nodes=1 +#SBATCH --ntasks=1 +#SBATCH --cpus-per-task=8 +#SBATCH --gpus-per-node=1 +#SBATCH --mem=64G +#SBATCH --time=48:00:00 +#SBATCH --output=runs/slurm_logs/%j_stable_init.out +#SBATCH --error=runs/slurm_logs/%j_stable_init.err + +# ============================================================ +# Experiment 3: Stability-Aware Initialization +# ============================================================ +# Hypothesis: The network starts chaotic (lambda~2-3) because of +# standard Kaiming initialization. Using smaller weights from the +# start should produce more stable dynamics. +# +# Stable init strategy: +# - Scale down weights by 0.5 +# - Use orthogonal init for linear layers (preserves gradient norm) +# - Should produce lambda closer to 0 initially +# ============================================================ + +set -e + +PROJECT_DIR="/projects/bfqt/users/yurenh2/ml-projects/snn-training" +cd "$PROJECT_DIR" + +mkdir -p runs/slurm_logs data + +echo "============================================================" +echo "STABLE INITIALIZATION Experiment" +echo "Job ID: $SLURM_JOB_ID | Node: $SLURM_NODELIST" +echo "Start: $(date)" +echo "============================================================" +nvidia-smi --query-gpu=name,memory.total --format=csv,noheader +echo "============================================================" + +python files/experiments/depth_scaling_benchmark.py \ + --dataset cifar100 \ + --depths 4 8 12 16 \ + --T 4 \ + --epochs 150 \ + --batch_size 128 \ + --lr 0.001 \ + --lambda_reg 0.1 \ + --lambda_target -0.1 \ + --reg_type squared \ + --warmup_epochs 20 \ + --stable_init \ + --data_dir ./data \ + --out_dir runs/depth_scaling_stable_init \ + --device cuda + +echo "============================================================" +echo "Finished: $(date)" +echo "============================================================" -- cgit v1.2.3