microsoft / Swin-Transformer

This is an official implementation for "Swin Transformer: Hierarchical Vision Transformer using Shifted Windows".
https://arxiv.org/abs/2103.14030
MIT License
13.74k stars 2.04k forks source link

How to run SwinT on multi-GPU? #313

Open gcunhase opened 1 year ago

gcunhase commented 1 year ago

Command to repro

torchrun --nproc_per_node=4 main.py --eval \
    --cfg ./configs/swin/swin_tiny_patch4_window7_224.yaml \
    --resume ../swin_tiny_patch4_window7_224.pth \
    --data-path /data1/imagenet/ \
    --batch-size=128

Issue

Log:

Swin Transformer training and evaluation script: error: the following arguments are required: --local_rank

Reason:

Related: https://github.com/microsoft/Swin-Transformer/issues/158

touristourist commented 1 year ago

Hi, have you solved it?