mmselfsup/tools/dist_extract.sh

14 lines
360 B
Bash
Raw Normal View History

2020-06-16 00:05:18 +08:00
#!/usr/bin/env bash
2020-06-17 01:31:59 +08:00
set -x
2020-06-16 00:05:18 +08:00
PYTHON=${PYTHON:-"python"}
CFG=$1
2020-06-17 01:31:59 +08:00
GPUS=$2
2020-06-19 17:04:59 +08:00
WORK_DIR=$3
PY_ARGS=${@:4} # "--checkpoint $CHECKPOINT --pretrained $PRETRAINED"
2020-06-16 00:05:18 +08:00
PORT=${PORT:-29500}
2020-06-17 01:31:59 +08:00
$PYTHON -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \
tools/extract.py $CFG --layer-ind "0,1,2,3,4" --work_dir $WORK_DIR \
--launcher pytorch ${PY_ARGS}