xda xdo script

This commit is contained in:
2026-02-06 17:07:59 +08:00
parent 91e873c365
commit 2ae7cb81fe
10 changed files with 112 additions and 197 deletions

View File

@@ -2,19 +2,26 @@
# custom config
DATA="/path/to/dataset/folder"
DATA=" ~/Datasets/CoOp"
TRAINER=PromptSRC
DATASET=$1
SEED=$2
CFG=vit_b16_c2_ep5_batch4_4+4ctx_cross_datasets
CFG=vit_b16_c2_ep20_batch4_4+4ctx_cross_datasets
SHOTS=16
DIR=output/${DATASET}/${TRAINER}/${CFG}_${SHOTS}shots/seed${SEED}
DIR=output_xd/base2new/train_base/${DATASET}/shots_${SHOTS}/${TRAINER}/${CFG}/seed${SEED}
if [ -d "$DIR" ]; then
echo "Results are available in ${DIR}."
echo "Results are available in ${DIR}. Resuming..."
python train.py \
--root ${DATA} \
--seed ${SEED} \
--trainer ${TRAINER} \
--dataset-config-file configs/datasets/${DATASET}.yaml \
--config-file configs/trainers/${TRAINER}/${CFG}.yaml \
--output-dir ${DIR} \
DATASET.NUM_SHOTS ${SHOTS}
else
echo "Run this job and save the output to ${DIR}"
@@ -26,4 +33,5 @@ else
--config-file configs/trainers/${TRAINER}/${CFG}.yaml \
--output-dir ${DIR} \
DATASET.NUM_SHOTS ${SHOTS}
fi
fi