blob: 3737013c91c48e256f017ab22465fc2dd8db0be3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
#!/bin/bash
# Run full clean sparsity analysis — each method+seed in independent Python process
# GPU 1 only (CUDA_VISIBLE_DEVICES=1)
set -e
cd /home/yurenh2/fa
export CUDA_VISIBLE_DEVICES=1
mkdir -p results/confirmatory/clean_sparsity
CIFAR_SEEDS="42 123 456 789 1024 2048"
CIFAR_METHODS="bp dfa state_bridge credit_bridge"
SYNTH_SEEDS="42 123 456 789 1024 2048"
SYNTH_METHODS="bp dfa state_bridge credit_bridge"
SYNTH_ALPHAS="0.0 0.5 1.0"
SYNTH_DEPTHS="4 8"
echo "=== CIFAR SPARSITY ($(echo $CIFAR_SEEDS | wc -w) seeds × $(echo $CIFAR_METHODS | wc -w) methods) ==="
count=0
total=$(($(echo $CIFAR_SEEDS | wc -w) * $(echo $CIFAR_METHODS | wc -w)))
for method in $CIFAR_METHODS; do
for seed in $CIFAR_SEEDS; do
count=$((count + 1))
echo "[$count/$total] CIFAR $method s=$seed"
python experiments/clean_sparsity_full.py --dataset cifar --method $method --seed $seed --gpu 0 --output_dir results/confirmatory/clean_sparsity
done
done
echo "=== CIFAR DONE ==="
echo ""
echo "=== SYNTHETIC SPARSITY ==="
count=0
total=$(($(echo $SYNTH_SEEDS | wc -w) * $(echo $SYNTH_METHODS | wc -w) * $(echo $SYNTH_ALPHAS | wc -w) * $(echo $SYNTH_DEPTHS | wc -w)))
for alpha in $SYNTH_ALPHAS; do
for depth in $SYNTH_DEPTHS; do
for method in $SYNTH_METHODS; do
for seed in $SYNTH_SEEDS; do
count=$((count + 1))
ckpt="results/confirmatory/checkpoints_A1/a${alpha}_L${depth}_${method}_s${seed}.pt"
if [ ! -f "$ckpt" ]; then
echo "[$count/$total] SKIP $ckpt"
continue
fi
echo "[$count/$total] synth a=$alpha L=$depth $method s=$seed"
python experiments/clean_sparsity_full.py --dataset synth --method $method --seed $seed --alpha $alpha --depth $depth --gpu 0 --output_dir results/confirmatory/clean_sparsity
done
done
done
done
echo "=== SYNTHETIC DONE ==="
echo "=== ALL CLEAN SPARSITY DONE ==="
|