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_depth_scaling_cifar100.sbatch | 61 +++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 scripts/run_depth_scaling_cifar100.sbatch (limited to 'scripts/run_depth_scaling_cifar100.sbatch') diff --git a/scripts/run_depth_scaling_cifar100.sbatch b/scripts/run_depth_scaling_cifar100.sbatch new file mode 100644 index 0000000..79b63da --- /dev/null +++ b/scripts/run_depth_scaling_cifar100.sbatch @@ -0,0 +1,61 @@ +#!/bin/bash +#SBATCH --job-name=snn_cifar100_depth +#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_cifar100_depth.out +#SBATCH --error=runs/slurm_logs/%j_cifar100_depth.err + +# ============================================================ +# CIFAR-100 Depth Scaling Benchmark +# ============================================================ +# KEY EXPERIMENT: Show that deep SNNs outperform shallow ones +# when trained with Lyapunov regularization. +# +# CIFAR-100 (100 classes) is ideal because: +# - Complex enough that shallow networks plateau +# - Deep networks can learn richer representations +# - Standard benchmark with known baselines +# +# Expected results: +# - Shallow (4 layers): Similar for both methods +# - Deep (16 layers): Vanilla fails/plateaus, Lyapunov succeeds +# ============================================================ + +set -e + +PROJECT_DIR="/projects/bfqt/users/yurenh2/ml-projects/snn-training" +cd "$PROJECT_DIR" + +mkdir -p runs/slurm_logs data + +echo "============================================================" +echo "CIFAR-100 Depth Scaling Benchmark" +echo "Job ID: $SLURM_JOB_ID | Node: $SLURM_NODELIST" +echo "Start: $(date)" +echo "============================================================" +nvidia-smi --query-gpu=name,memory.total --format=csv,noheader +echo "============================================================" + +# Test depths: 4, 8, 12, 16, 20 conv layers +python files/experiments/depth_scaling_benchmark.py \ + --dataset cifar100 \ + --depths 4 8 12 16 20 \ + --T 4 \ + --epochs 150 \ + --batch_size 128 \ + --lr 0.001 \ + --lambda_reg 0.3 \ + --lambda_target -0.1 \ + --data_dir ./data \ + --out_dir runs/depth_scaling \ + --device cuda + +echo "============================================================" +echo "Finished: $(date)" +echo "============================================================" -- cgit v1.2.3