以mmdetection工程为例
1 ubuntu使用sh套py脚本来调用
train.sh
#!/usr/bin/env bash CONFIG=configs/xx/cfg_1.py WORK_DIR=train_result/20220825 CKPT=train_result/20220701-7-1/epoch_630.pth PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ python $(dirname "$0")/train.py $CONFIG --work-dir=$WORK_DIR --resume-from=$CKPT
2 win使用bat套py脚本来调用
train.bat
@echo off :: aaa set CONFIG='configs/xx/cfg_1.py' set WORK_DIR='train_result/20220825' set CKPT='train_result/20220701-7-1/epoch_630.pth' set My_PATH=%cd% set PATH=%PATH%;%My_PATH% python tools/train.py %CONFIG% --work_dir=%WORK_DIR% --resume-from=%CKPT%
标签:set,python,win,py,train,result,快捷方式,WORK From: https://www.cnblogs.com/dxscode/p/16802763.html