jeonsworld / ViT-pytorch

Pytorch reimplementation of the Vision Transformer (An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

For torch.distributed.launch ARG --local_rank should be --local-rank

hassanbabaie opened this issue · comments

When using -m torch.distributed.launch --nproc_per_node=2 as an example it uses --local-rank and not the expected --local_rank which generate a fatal error.

parser.add_argument("--local_rank", type=int, default=-1,

Setting the arg to local-rank in train.py resolved the issue and it then works as expected