wenwenyu / PICK-pytorch

Code for the paper "PICK: Processing Key Information Extraction from Documents using Improved Graph Learning-Convolutional Networks" (ICPR 2020)
https://arxiv.org/abs/2004.07464
MIT License
556 stars 193 forks source link

RuntimeError: cuda runtime error (101) : invalid device ordinal at /pytorch/torch/csrc/cuda/Module.cpp:59咋处理? #14

Closed jingmouren closed 4 years ago

jingmouren commented 4 years ago

照着readme用的 CUDA_VISIBLE_DEVICES=1,2 python -m torch.distributed.launch --nnode=1 --node_rank=0 --nproc_per_node=4 \ --master_addr=127.0.0.1 --master_port=5555 \ train.py -c config.json --local_world_size 2 报标题错误 是config里也要作对应改动吗?如何改。谢谢

wenwenyu commented 4 years ago

@jingmouren 运行命令中--nproc_per_node=4改为--nproc_per_node=2

jingmouren commented 4 years ago

改了能运行了。 就是说nproc_per_node和nproc_per_node要一样?

wenwenyu commented 4 years ago

@jingmouren 推荐用法是nproc_per_nodelocal_world_size设置和CUDA_VISIBLE_DEVICES的数量一致