File size: 698 Bytes
3ce19a2 | 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 | #!/usr/bin/env bash
set -euo pipefail
cd "$(dirname "$0")/.."
DATA_DIR="${DATA_DIR:-/path/to/cifar-10}"
SAVE_DIR="${SAVE_DIR:-./runs/cifar10_rtm}"
CKPT_DIR="${CKPT_DIR:?CKPT_DIR (path to a checkpoints/<exp>/ folder) must be set}"
NUM_GPUS="${NUM_GPUS:-1}"
CFG_FILE="${CFG_FILE:-src/configs/CIFAR10/StyleGAN2-ADA-RTM.yaml}"
CMD=(python src/main.py -hdf5 -best
--cfg_file "$CFG_FILE"
--data_dir "$DATA_DIR"
--save_dir "$SAVE_DIR"
-ckpt "$CKPT_DIR"
-metrics fid is prdc
--eval_backbone "InceptionV3_torch"
--post_resizer "friendly"
--num_eval 1
--num_workers 4
--seed 0)
if [ "$NUM_GPUS" -gt 1 ]; then
"${CMD[@]}" -DDP
else
"${CMD[@]}"
fi
|