#!/usr/bin/env bash # Scellier & Bengio (2017) one-hidden-layer MNIST protocol, adapted only to # evaluate on the standard 10k test split. Persistent particles use the fixed # first 50k training examples, matching the author's training-set size. # Usage: ep_original_sweep.sh "" [prefix] set -eu cd "$(dirname "$0")/.." PY=/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3 GPU="${1:?GPU index required}" SEEDS="${2:-0}" PREFIX="${3:-ep_original_v2}" export CUDA_VISIBLE_DEVICES="$GPU" export OMP_NUM_THREADS=2 mkdir -p results logs/baselines for seed in $SEEDS; do tag="${PREFIX}_mnist_ep_w500_d1_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 ep --dataset mnist --depth 1 --width 500 --epochs 25 \ --batch_size 20 --train_examples 50000 --ep_persistent 1 \ --seed "$seed" --tag "$tag" --outdir results > "$log" 2>&1 grep -h DONE "$log" done