pei2333's picture
Add files using upload-large-folder tool
5f0e48f verified
Raw History Blame Contribute Delete
1.12 kB
#!/usr/bin/env bash
# 1-epoch smoke run of every training mode on 5% of A_weather (run from code/): bash smoke.sh <gpu>
set -e
D=../datasets/A_weather g=${1:-0}
export OMP_NUM_THREADS=8 MKL_NUM_THREADS=8 CUDA_DEVICE_ORDER=PCI_BUS_ID
P="${PY:-python} gridkd.py"
c="epochs=1 fraction=0.05 batch=16 device=$g project=../runs/smoke exist_ok=True plots=False"
$P train --data $D/clear.yaml --model ../weights/pretrained/yolo11n.pt $c name=plain
$P train --data $D/clear.yaml --model ../weights/pretrained/yolo11n.pt --teacher ../runs/smoke/plain/weights/last.pt $c name=kd
$P train --data $D/multi.yaml --model ../runs/smoke/kd/weights/last.pt --teacher ../runs/smoke/plain/weights/last.pt --lora-r 4 --lora-k 4 --domains /clear/,/fog/ optimizer=AdamW lr0=1e-3 $c name=lora
$P eval --weights ../runs/smoke/plain/weights/last.pt ../runs/smoke/kd/weights/last.pt ../runs/smoke/lora/weights/last.pt --data $D/clear.yaml $D/fog.yaml --device $g
$P merge --weights ../runs/smoke/lora/weights/last.pt --gates 1,0,0,0 --out ../runs/smoke/lora_merged.pt
$P eval --weights ../runs/smoke/lora_merged.pt --data $D/clear.yaml --device $g