#!/usr/bin/env bash # SPDX-License-Identifier: MIT # YS-EN-0003 ยท the full experiment, in the order it was run. # bash run_all.sh # all phases (~7 h on a GTX 1060 6 GB) # bash run_all.sh 2 # one phase (5 needs ~/ys-work/ogle/ogle_slc.npz from build_ogle.py) # Every run appends one line to results/image_runs.jsonl. set -euo pipefail cd "$(dirname "$0")" PY=${PY:-python3} T="$PY train_image.py ${SKIP_DONE:+--skip-done}" # SKIP_DONE=1 resumes an interrupted grid phase=${1:-all} R="0 1 2" if [[ $phase == all || $phase == 1 ]]; then # which encoding? (ResNet-18, ImageNet weights) for r in $R; do for e in gasf gadf mtf rp line stack; do $T --encoding $e --backbone resnet18 --pretrained --resample $r done; done fi if [[ $phase == all || $phase == 2 ]]; then # which backbone? does pretraining matter? E=${E:-stack} for r in $R; do $T --encoding $E --backbone resnet18 --resample $r # same net, random init for b in resnet50 convnext_t efficientnet_b0 vit_s16 dinov2_s; do $T --encoding $E --backbone $b --pretrained --resample $r done for b in resnet50 dinov2_s; do # frozen features only $T --encoding $E --backbone $b --probe --resample $r done done fi if [[ $phase == all || $phase == 3 ]]; then # re-creation of the 2023 notebook for r in $R; do $T --original --resample $r; done fi if [[ $phase == all || $phase == 4 ]]; then # learning curve: is pretraining worth more with less data? E=${E:-stack}; B=${B:-resnet18} for r in $R; do for n in 25 50 100 250 500; do $T --encoding $E --backbone $B --pretrained --resample $r --ntrain $n $T --encoding $E --backbone $B --resample $r --ntrain $n done; done fi if [[ $phase == all || $phase == 5 ]]; then # the same image model on OGLE-SLC (shape only) for r in $R; do $T --dataset ogle --encoding stack --backbone resnet18 --pretrained --resample $r; done fi