yuhongtian17 / Spatial-Transform-Decoupling

MIT License
89 stars 7 forks source link

如何加载resume #30

Open WinniePooh-XI opened 4 months ago

WinniePooh-XI commented 4 months ago

老师您好,我们希望用多个数据集对预训练模型做微调,修改dist_train.sh

CONFIG=$1
GPUS=$2
NNODES=${NNODES:-1}
NODE_RANK=${NODE_RANK:-0}
PORT=${PORT:-27001}
MASTER_ADDR=${MASTER_ADDR:-"127.0.0.1"}

PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \
python -m torch.distributed.launch \
    --nnodes=$NNODES \
    --node_rank=$NODE_RANK \
    --master_addr=$MASTER_ADDR \
    --nproc_per_node=$GPUS \
    --master_port=$PORT \
    $(dirname "$0")/train.py \
    --resume-from='/home1/XXXX/work_dirs/XXXX/epoch_10.pth'\
    --auto-resume True\
    $CONFIG \
    --seed 0 \
    --launcher pytorch ${@:3}

训练log显示

resume_from = None
auto_resume = False

请问该怎么加载预训练模型?

yuhongtian17 commented 3 months ago

参考这个