summaryrefslogtreecommitdiff
path: root/scripts/run_smnist.sbatch
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/run_smnist.sbatch')
-rw-r--r--scripts/run_smnist.sbatch56
1 files changed, 56 insertions, 0 deletions
diff --git a/scripts/run_smnist.sbatch b/scripts/run_smnist.sbatch
new file mode 100644
index 0000000..2913410
--- /dev/null
+++ b/scripts/run_smnist.sbatch
@@ -0,0 +1,56 @@
+#!/bin/bash
+#SBATCH --job-name=snn_smnist
+#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=32G
+#SBATCH --time=48:00:00
+#SBATCH --output=runs/slurm_logs/%j_smnist.out
+#SBATCH --error=runs/slurm_logs/%j_smnist.err
+
+# ============================================================
+# Sequential MNIST Experiment
+# ============================================================
+# This is a HARD benchmark:
+# - 784 timesteps (one pixel at a time)
+# - Requires long-range temporal memory
+# - Shallow networks struggle, deep networks needed
+#
+# Expected: Lyapunov regularization significantly helps at depth 6+
+# ============================================================
+
+set -e
+
+PROJECT_DIR="/projects/bfqt/users/yurenh2/ml-projects/snn-training"
+cd "$PROJECT_DIR"
+
+mkdir -p runs/slurm_logs data
+
+echo "============================================================"
+echo "Sequential MNIST 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 "============================================================"
+
+# Sequential MNIST with depths up to 10
+python files/experiments/benchmark_experiment.py \
+ --dataset smnist \
+ --depths 2 4 6 8 10 \
+ --hidden_dim 128 \
+ --epochs 30 \
+ --batch_size 128 \
+ --lr 0.001 \
+ --lambda_reg 0.3 \
+ --lambda_target -0.1 \
+ --data_dir ./data \
+ --out_dir runs/benchmark \
+ --device cuda
+
+echo "============================================================"
+echo "Finished: $(date)"
+echo "============================================================"