a | b/tools/dist_test.sh | ||
---|---|---|---|
1 | #!/usr/bin/env bash |
||
2 | |||
3 | CONFIG=$1 |
||
4 | CHECKPOINT=$2 |
||
5 | GPUS=$3 |
||
6 | PORT=${PORT:-29500} |
||
7 | |||
8 | PYTHONPATH="$(dirname $0)/..":$PYTHONPATH \ |
||
9 | # Arguments starting from the forth one are captured by ${@:4} |
||
10 | python -m torch.distributed.launch --nproc_per_node=$GPUS --master_port=$PORT \ |
||
11 | $(dirname "$0")/test.py $CONFIG $CHECKPOINT --launcher pytorch ${@:4} |